Python OS X 10.5 development environment

前端 未结 2 1099
遥遥无期
遥遥无期 2021-02-10 14:47

I would like to try out the Google App Engine Python environment, which the docs say runs 2.5.2. As I use OS X Leopard, I have Python 2.5.1 installed, but would like the latest

2条回答
  •  野的像风
    2021-02-10 15:27

    Your current python is in /System/Library/Frameworks/Python.framework/.

    If you install MacPython, it will go into /Library/Frameworks/Python.framework/. The installer will modify your $PATH (environment variable) so that typing python at the command line will run the version it installs.

    You can easily get back the old version by modifying the path again.

    You will have to reinstall any third-party modules you are using. This is because third-party modules go into Python.framework/Versions/Current/lib/python2.5/site-packages/ for the version you're running.

    Since you're not modifying the system version, you aren't in danger of affecting any Apple system tools that rely on it.

    (in fact, arguably it is safer to install MacPython from the start, and never touch the Apple-supplied version. See here for a similar situation involving Perl, where Apple updated the version of Perl in /System and broke a lot of people's setups)

    You may also be interested in virtualenv.

提交回复
热议问题