use*_*250 5 python easy-install macos
我在 Mac 上安装了 Python 2.7。在终端中输入“python”时,它显示:
$ python
Python 2.7 (r27:82508, Jul 3 2010, 20:17:05)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Run Code Online (Sandbox Code Playgroud)
Python 版本在这里是正确的。
但是当我尝试 easy_install 一些模块时。系统将安装python 2.6版本无法导入到Python 2.7的模块。当然,我无法在代码中执行所需的功能。下面是一个例子easy_install graphy:
$ easy_install graphy
Searching for graphy
Reading pypi.python.org/simple/graphy/
Reading http://code.Google.com/p/graphy/
Best match: Graphy 1.0.0
Downloading http://pypi.python.org/packages/source/G/Graphy/Graphy- 1.0.0.tar.gz#md5=390b4f9194d81d0590abac90c8b717e0
Processing Graphy-1.0.0.tar.gz
Running Graphy-1.0.0/setup.py -q bdist_egg --dist-dir /var/folders/fH/fHwdy4WtHZOBytkg1nOv9E+++TI/-Tmp-/easy_install-cFL53r/Graphy-1.0.0/egg-dist-tmp-YtDCZU
warning: no files found matching '*.tmpl' under directory 'graphy'
warning: no files found matching '*.txt' under directory 'graphy'
warning: no files found matching '*.h' under directory 'graphy'
warning: no previously-included files matching '*.pyc' found under directory '.'
warning: no previously-included files matching '*~' found under directory '.'
warning: no previously-included files matching '*.aux' found under directory '.'
zip_safe flag not set; analyzing archive contents...
graphy.all_tests: module references __file__
Adding Graphy 1.0.0 to easy-install.pth file
Installed /Library/Python/2.6/site-packages/Graphy-1.0.0-py2.6.egg
Processing dependencies for graphy
Finished processing dependencies for graphy
Run Code Online (Sandbox Code Playgroud)
所以它为 Python 2.6 安装了 graphy。
有人可以帮我吗?我只想将我的默认easy_installPython 版本设置为 2.7。
小智 6
您安装的 setuptools 似乎已过时。
如果您希望您的“easy_install”与您更新的 python 版本匹配,请按照下列步骤操作:
sh setuptools-0.6c9-py2.7.egg这将安装新的“easy_install”可执行文件,与您当前版本的 python 兼容。
希望这可以帮助。
(更多详情见http://pypi.python.org/pypi/setuptools#cygwin-mac-os-x-linux-other)
| 归档时间: |
|
| 查看次数: |
8415 次 |
| 最近记录: |