繁体   English   中英

安装了各种版本的python的easy_install,mac osx

[英]easy_install with various versions of python installed, mac osx

我在mac OSX 10.6机器上有各种版本的python,其中一些安装了macports:

> python_select -l
Available versions:
current none python24 python26 python26-apple python27

默认或系统版本是python26-apple 我现在正在使用我选择的python27

> sudo python_select python27

我最近尝试使用easy_install安装django,但它安装了默认的python(我可以通过python_selecting python26-apple和导入django来检查)。 相反,如果我下载django tarball,请展开并使用

> sudo python setup.py install

一切都按预期工作,即我在python 2.7中得到django。 现在的问题是,有没有办法让easy_install使用我用python_select选择的python版本?

UPDATE显然不推荐使用python_select 以下命令似乎是等效的:

port select --list python

生产:

Available versions for python:
    none
    python24
    python26
    python26-apple
    python27 (active)

如果您希望“easy_install”与更新的python版本匹配,请按照下列步骤操作:

http://pypi.python.org/pypi/setuptools#files下载相应的.egg文件。运行它就好像它是一个shell脚本:sh setuptools-0.6c9-py2.7.egg这将安装新的“easy_install” “可执行文件,与您当前版本的python兼容。

希望这可以帮助。

(更多详情请访问http://pypi.python.org/pypi/setuptools#cygwin-mac-os-x-linux-other

请务必在该shell脚本上使用-prefix =选项来控制easy_install版本所在的位置。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM