How can I restore my default python install on OSX?
I'm trying to install pyobjc (using pyobjc-1.2-python2.3-macosx10.2.dmg) on a M开发者_如何学运维ac running OSX 10.6 and I get the following error message:
To use Python 2.3 I tried re-editing my .bash_profile and I commented out everything with the exception of this line:
# change python version
defaults write com.apple.versioner.python Version 2.3
I did previously include this:
PATH="/Library/Frameworks/Python.framework/Versions/2.3/bin:/usr/bin:/bin${PATH}"
export PATH
but at the moment left it out. I know that when I type python
in the terminal it gives me Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29)
so it clearly is not using 2.3.
What can I do to fix this?
That version of PyObjC
is very old. It may not even run on Mac OS X 10.6. Further, Apple doesn't ship a full python2.3 with OS X 10.6. The Apple-supplied Python 2.6 (/usr/bin/python2.6
) already has PyObjC
installed. If you need an even newer version, installer the latest Python 2.6 (or Python 2.7) using a OS X installer from the python.org
website, install easy_install
for that Python using Distribute or setuptools, and then install PyObjC from PyPi:
/Library/Frameworks/Python.framework/Versions/2.6/bin/easy_install pyobjc
You should undo the effects of that defaults
command, too. It is only going to cause problems.
defaults write com.apple.versioner.python Version 2.6
精彩评论