![]() For more options issue port select (MacPorts 2.x) So you see, this package nicely plays with Mac. Shows the currently selected version, e.g. In my case it printed at least python version which comes by default with Snow Leopard: python26-apple. Just issue the command: port select -list python (MacPorts 2.x) So first install mac ports if not already installed.įirst install the python_select package: sudo port install python_selectĪlready now you can check which python distributions are available on you system. There is a package called python_select which allows using pythons in parallel. ![]() ![]() It sure does seem like a bug that the symlink isn’t updated when you update the Python version. However, it’s possible-haven’t tested-that the Current symlink is used by either easy_install or pip. So it should not be a problem for most scripts. Nor is the Current symlinked directory on the path. However, run a short script that print()s the sys.path and (at least on my relatively default setup) the 2.6 library directories are on the path and the 2.7 dirs are not on the path. This does not solve the symlink in /System/Library/Frameworks/amework/Versions where Current point to 2.7 which may cause problems (because it is still in the sys.path with 2.6 !) This is true whether I run python directly, or use an executable script starting with #!/usr/bin/env python-I get the expected version of Python. (And likewise after changing back to 2.7.) After doing defaults write Version 2.6, the default version of Python is indeed 2.6. So the fact that you are getting 2.5 may indicate that there’s something else in your path. I only mention this because my default is 2.6 under Snow Leopard (it was 2.5 when I was using Leopard). Do this by typing which python at your command prompt. See man python for a complete explanation from Apple.Īlso, one gotcha: make sure you are running the Python that came with your computer and not some other one that you installed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |