Failure: Centos 6.4 python easy_install is broken

时间:2015-09-01 21:51:23

标签: python matplotlib pip centos6 easy-install

I've looked at quite a lot of related questions here - no help for me. I need to repair easy_install, so that I can update distribute to a version >=0.6.28, so that I can update python matplotlib using pip and not yum.

In the process of trying to update python matplotlib from 0.99 (the default with Centos64) to 1.4.x, I got into this trouble:

pip install --upgrade matplotlib tells me this:

Complete output from command python setup.py egg_info:
The required version of distribute (>=0.6.28) is not available,
and can't be installed while this script is running. Please
install a more recent version first, using
'easy_install -U distribute'.
(Currently using distribute 0.6.10 (/usr/lib/python2.6/site-packages))

So I followed the suggestion and saw that some 0.7.x version of distribute was installed (so it seemed). Re-ran the pip command and got the exact same complaint.

Trouble with easy_install? It was either now, or maybe after performing yum remove, then install python-setuptools that I discovered easy_install is thoroughly broken. Now when I try to run easy_install, I get this stacktrace:

Traceback (most recent call last):
  File "/usr/local/bin/easy_install", line 9, in <module>
    load_entry_point('distribute', 'console_scripts', 'easy_install')()
  File "/usr/local/lib/python3.3/site-packages/setuptools-18.2-py3.3.egg/pkg_resources/__init__.py", line 558, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python3.3/site-packages/setuptools-18.2-py3.3.egg/pkg_resources/__init__.py", line 2681, in load_entry_point
    raise ImportError("Entry point %r not found" % ((group, name),))
ImportError: Entry point ('console_scripts', 'easy_install') not found

Look at that - why is it referring to python3.3? I don't think I've got that installed. My default python is 2.6.6.

Any ideas? TIA.

1 个答案:

答案 0 :(得分:0)

修正了它。 python3.3位是我的线索。我在/ usr / local / bin中找到了easy_install的python脚本。第一行指定 /usr/bin/python3.3 来执行脚本。改为2.6,然后很高兴。

最后我无法将matplotlib从0.99升级到1.4.3,因为我无法从0.99升级底图并且出现了一些冲突。我认为我应该简单地将整个虚拟机升级到Centos7,然后我会使用更新的matplotlib,而不是通过尝试从源代码构建来惩罚自己。