Problem pyton PIL
Chris Jones
jonesc at hep.phy.cam.ac.uk
Tue Apr 15 06:45:26 PDT 2014
Hi,
On 15/04/14 14:41, Spinxer wrote:
> Am 15.04.14 15:31, schrieb Chris Jones:
>>
>> Looks like you are still not getting MacPorts python there. You should
>> see something like
>>
>> macmini ~ > which python
>> /opt/local/bin/python
>
> Okay… That gives me:
>
> $ which python
> /Library/Frameworks/Python.framework/Versions/2.7/bin/python
So, do you have that path in your $PATH (it will really help if you sent
what
> echo $PATH
gives ....)
>
>> Have you added macPorts bin prefix (/opt/local/bin by default) to your
>> PATH
> No. I was under the impression that the
>
> sudo port select --set python python27
>
> does everything for me so that the default python is now macports' python.
No. When ports like pythonXY provide multiple different versions, they
get installed under your installation prefix (e.g.. /opt/local) with
versioned names. Port select just makes symlinks of these to unversioned
names. e.g.
macmini /opt/local/bin > sudo port select python python27
Selecting 'python27' for 'python' succeeded. 'python27' is now active.
macmini /opt/local/bin > ls -lth python
lrwxr-xr-x 1 root admin 24B 15 Apr 14:41 python ->
/opt/local/bin/python2.7
macmini /opt/local/bin > sudo port select python python26
Selecting 'python26' for 'python' succeeded. 'python26' is now active.
macmini /opt/local/bin > ls -lth python
lrwxr-xr-x 1 root admin 24B 15 Apr 14:42 python ->
/opt/local/bin/python2.6
You still have to make sure /opt/local/bin is first in your path, to
make sure you pick up preferentially the MacPorts versions over anything
else.
>
> So if I understood correct this is NOT the case. So what ist the command
> good for?
It does exactly what you want.
Chris
>
> Anyhow:
>
> $ /opt/local/bin/python
> Python 2.7.6 (default, Apr 14 2014, 14:18:39)
> [GCC 4.2.1 (Apple Inc. build 5566)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from PIL import Image
>>>>
>
> So it seems you are right and using the full path for python (or putting
> the path into PATH) should help.
>
> Thanks for that.
>
> If anyone can point me to the information what's "sudo port select --set
> python python27" good for, I think it would be perfect.
>
>
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-users
More information about the macports-users
mailing list