【发布时间】:2011-11-29 09:54:46
【问题描述】:
我正在运行安装了 python 2.6 和 2.7 的 Mac OS X Lion 10.7.1。我已将 2.6 作为我的默认版本。我正在尝试安装一个包,它安装到 2.7。我的设置如下所示:
~:hi› which python
/usr/bin/python
~:hi› python -V
Python 2.6.6
~:hi› python
Python 2.6.6 (r266:84292, Jun 16 2011, 16:59:16)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.prefix
'/System/Library/Frameworks/Python.framework/Versions/2.6'
>>> sys.exec_prefix
'/System/Library/Frameworks/Python.framework/Versions/2.6'
不应该安装在 2.6 的站点包中吗?我是否误解了这应该如何工作?
编辑
有问题的包是virtuanenvwrapper
-
我将 2.6 设为我的默认版本,如下所示:
defaults write com.apple.versioner.python Version 2.6 -
我试过这样安装:
sudo python setup.py install sudo /usr/bin/python setup.py install
【问题讨论】:
-
哪个包?你是怎么安装的?您是如何将 2.6 设为默认值的?请不要让我们猜测关键细节。
-
抱歉...问题已编辑以提供更多详细信息。
标签: python macos setuptools distutils