Turbogears:更新到 mac osx 10.6 后无法启动 Paster
更新到 mac osx 10.6 后,我必须切换回 python 2.5 才能使虚拟环境正常工作。但我仍然无法开始我的涡轮齿轮项目。帕斯特给出了这个:
Traceback (most recent call last):
File ".../tg2env/bin/paster", line 5, in <module>
from pkg_resources import load_entry_point
File ".../tg2env/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 657, in <module>
File ".../tg2env/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 660, in Environment
File ".../tg2env/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 55, in get_supported_platform
File ".../tg2env/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 186, in get_build_platform
File ".../tg2env/lib/python2.5/distutils/__init__.py", line 14, in <module>
exec open(os.path.join(distutils_path, '__init__.py')).read()
IOError: [Errno 2] No such file or directory: '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/__init__.py'
有什么想法吗?谢谢。
After updateing to mac osx 10.6 I had to switch back to python 2.5 in order to make virtual env work. But still I can not start my turbogears project. Paster is giving this :
Traceback (most recent call last):
File ".../tg2env/bin/paster", line 5, in <module>
from pkg_resources import load_entry_point
File ".../tg2env/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 657, in <module>
File ".../tg2env/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 660, in Environment
File ".../tg2env/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 55, in get_supported_platform
File ".../tg2env/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 186, in get_build_platform
File ".../tg2env/lib/python2.5/distutils/__init__.py", line 14, in <module>
exec open(os.path.join(distutils_path, '__init__.py')).read()
IOError: [Errno 2] No such file or directory: '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/__init__.py'
Any ideas? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
为什么需要切换回 2.5 才能使 virtualenv 正常工作?我已经升级到 10.6 并且很高兴在 Python 2.6 中使用 virtualenv。
Why did you need to switch back to 2.5 to make virtualenv work? I have upgraded to 10.6 and am happily using virtualenv in Python 2.6.
Eggs 可能是为 2.6 发行版安装的。请在终端中运行:
查看第二行,它应该更改当前终端会话的 python 版本。
Probably eggs are installed for 2.6 distro. Please run in your terminal:
Check out the second line, it should change python version for current terminal session.
正如您所见,在 Snow Leopard 10.6 中,Apple 提供了 Python 2.6.2(
/usr/bin/python
的默认值)和旧版 Python 2.5.4(/usr /bin/python2.5
)。两者的核心都位于/System/Library/Frameworks/Python.framework
中。一般来说,/System
下的所有内容均由 Apple 提供和管理;其他人不应该修改它。如果该消息可信,则您的 10.6 安装有错误。
检查该文件是否存在并且具有正确的权限。如果没有,您应该找出您的
/System
还有什么问题,并考虑从备份恢复或重新安装 Snow Leopard。As you've seen, in Snow Leopard 10.6, Apple supplies both a Python 2.6.2 (the default for
/usr/bin/python
) and a legacy Python 2.5.4 (/usr/bin/python2.5
). The heart of both live in the/System/Library/Frameworks/Python.framework
. In general, everything under/System
is supplied and managed by Apple; it should not be modified by anyone else.If that message is to be believed, your 10.6 installation is faulty.
Check to see that file exists and with the correct permissions. If not, you should figure out what else is wrong with your
/System
and consider restoring from a backup or just reinstalling Snow Leopard.