在 Mac 10.6 上安装 Python 2.5,适用于 GAE/Django-nonrel(我是新的 mac 用户)
我的大问题是,我才学习 MacOSX 1 天,所以需要像我 4 岁的孩子一样向我解释基础知识。
我运行的是 OS 10.6 Snow Leopard,它附带了 Python 2.6。
真正的问题是让 Aptana 2.0 调试Google App Engine SDK,我需要 PIL 进行图像转换,这需要 python 2.5,并且应用程序使用 Django -nonrel 框架(我意识到我自己并没有让这变得容易)。
我已经熟悉 Python、Google App Engine 和 Django-nonrel,但在 Mac 上进行此设置时我迷失了。
1) How do I install a 2.5 and not screw up my already install 2.6?
2) How do I change the python path?
(顺便说一句,我完全感觉自己像一个 80 岁的老人试图在这个Mac)
My big problem here is that I'm 1 day into learning MacOSX so the basics need to be explained to me like I'm a 4 yr old.
I'm running OS 10.6, Snow Leopard, which comes with Python 2.6.
The real problem is getting Aptana 2.0 to debug Google App Engine SDK, which I require PIL for image transforming, which requires python 2.5, with the app using the Django-nonrel framework (I realize I didn't make this easy on myself).
I'm already familiar with Python, Google App Engine and Django-nonrel, but getting this setup on a Mac I'm lost.
1) How do I install a 2.5 and not screw up my already install 2.6?
2) How do I change the python path?
Info on how to install PIL on a mac
Mac PIL installer for Python 2.5
(Btw, I totally feel like a 80 yr old trying to program on this mac)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
10.6安装了python2.5,但默认是python2.6。使用python2.5的manage.py代替python的manage.py。
您还可以更改默认 python:
defaults write com.apple.versioner.python 版本 2.5
更改系统范围的 python 默认值可能会产生意想不到的副作用,具体取决于您的设置。
无论哪种情况,您仍然需要使用 easy_install-2.5
10.6 has python2.5 installed, but python2.6 is the default. Use python2.5 manage.py instead of python manage.py.
You can also change default python:
defaults write com.apple.versioner.python Version 2.5
Changing the system wide python default may have unintended side affects depending on your setup.
In either situation, you will still want to use easy_install-2.5
最简单的方法可能是安装 Mac Ports:
http://www.macports.org/
然后从终端窗口:
$ sudo port install python25
之后,您应该可以使用 python_select,您可以使用它来更改符号链接。
Easiest way is probably to install Mac Ports:
http://www.macports.org/
Then from a terminal window:
$ sudo port install python25
Afterwards, you should have python_select available, which you can use to change your symlinks.
我找到了这个 stackoverflow答案
如何安装 pythonbrew
如何使用 pythonbrew
I found this stackoverflow answer
How to install pythonbrew
How to use pythonbrew