我已经在已经安装了 python2.4 的 CentOS 机器上的 /opt/python2.7.1/ 下安装了 python,并将其配置为默认运行 python2.7。
但是,当我编写“easy_install”时,它会引发错误,例如
Traceback (most recent call last):
File "/opt/python2.7.1/bin/easy_install", line 5, in ?
from pkg_resources import load_entry_point
File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 2482, in ?
for dist in working_set.resolve(
File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 483, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: setuptools==0.6c11
我认为easy_install
在/usr/bin/
指向 python2.4 的链接下。我怎样才能运行/opt/python2.7.1/bin/easy_install
默认值?
对于 $PATH:
/opt/python2.7.1/bin:/usr/devs/bin:/usr/local/bin:/bin:/usr/bin:/home/ops/bin
对于 $LD_LIBRARY_PATH:
/opt/python2.7.1/lib:
对于easy_install:
Traceback (most recent call last):
File "/opt/python2.7.1/bin/easy_install", line 5, in ?
from pkg_resources import load_entry_point
File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 2482, in ?
for dist in working_set.resolve(
File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 483, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: setuptools==0.6c11