Python 3.2.3, easy_install, Mac OS X

ⅰ亾dé卋堺 提交于 2019-12-06 12:07:35

You've done the right first step, python3.2 distribute_setup.py. That should have installed a version of easy_install for your python3.2. Now you need to actually use that easy_install command rather than the ones that come pre-installed with OS X for the system Pythons. If you still have the output from the above command or if you run the command again, near the end you should see two lines like this:

Installing easy_install script to /Library/Frameworks/Python.framework/Versions/3.2/bin
Installing easy_install-3.2 script to /Library/Frameworks/Python.framework/Versions/3.2/bin

Those locations are for the OS X Python3.2 downloaded from python.org, you might see something else for other versions. That shows the directory where the easy_install scripts were installed. You could use an absolute path to execute the script:

/Library/Frameworks/Python.framework/Versions/3.2/bin/easy_install ...

but that's rather inconvenient. If you are planning to use Python3.2 extensively, you can modify your shell search PATH to add this directory to it. For most shells on OS X:

export PATH=/Library/Frameworks/Python.framework/Versions/3.2/bin:$PATH

You can add that to a shell initialization file, like ~/.bash_profile. If you installed the python.org Python 3.2, you can just double-click /Applications/Python 3.2/Update Shell Profile.command to do that for you. You will need to open an new terminal window afterwards to see the change.

For what its worth on my install of python3 (using homebrew), calling the correct binary was all that was required. easy_install3 was already on the system path, as was easy_install-3.3.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!