English 中文(简体)
Turbogears: 在更新至10.6兆克后,不能开端
原标题:Turbogears: Can not start paster after updateing to mac osx 10.6
  • 时间:2009-10-07 18:34:31
  •  标签:

更新后改为10.6os 我不得不改头换到第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 

任何想法? 感谢。

问题回答

为什么你们需要转向2.5,才能使虚拟工作发挥作用? 我已升至10.6,并习惯于在Alfredo 2.6中使用虚拟版本。

本来可以证明的鸡蛋被安装到2.6个 dis。 请在您的终点站运行:

defaults write com.apple.versioner.python Version 2.5
export VERSIONER_PYTHON_VERSION=2.5
sudo easy_install virtualenv

在第二行中,它应当改变目前终端会议的基本版本。

dgl@dgl:~/ > python
Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51) 
...
dgl@dgl:~/ > export VERSIONER_PYTHON_VERSION=2.5
dgl@dgl:~/ > python
Python 2.5.4 (r254:67916, Jul  7 2009, 23:51:24) 
...

如你所见,在Snow Leopard10.6中, Apple果供应了A/63/12.6.2(/usr/bin/python)和遗产2.5.4(/usr/bin/python2.5)。 两者的心脏都在<代码>/System/Library/Framework/Python.framework。 一般而言,在<代码>/System下的所有物品都由 Apple果提供和管理;不应由任何其他人修改。

如果要相信这一信息,你10.6个装置就错了。

$ cd /System/Library/Frameworks/Python.framework/Versions
$ ls -l
total 8
drwxr-xr-x  5 root  wheel  272 Sep  5 10:18 2.3/
drwxr-xr-x  9 root  wheel  408 Sep  5 10:43 2.5/
drwxr-xr-x  9 root  wheel  408 Sep  5 10:43 2.6/
lrwxr-xr-x  1 root  wheel    3 Sep  5 10:18 Current@ -> 2.6
$ ls -l 2.5/lib/python2.5/distutils/__init__.py
-rw-r--r--  1 root  wheel  635 Jul  7 23:55 2.5/lib/python2.5/distutils/__init__.py

$ /usr/bin/python2.5
Python 2.5.4 (r254:67916, Jul  7 2009, 23:51:24) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import distutils
>>>

查阅该档案的检查是存在的,并得到了正确的许可。 否则,你就应该指出你在<代码>/System上的错误,并考虑从支持或仅仅重整Snow Leopard。





相关问题
热门标签