[英]problems while installing python-mysql package
我有一个Ubuntu 12.04 x64服务器版VM,我正在运行python2.7并尝试通过命令安装MySQLdb软件包(我已经安装了easy_install
并正常工作):
$ sudo easy_install MySQL-python
但是当easy_install尝试编译时,我收到以下回溯错误:
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/python2.7/dist-packages/setuptools-1.1-py2.7.egg/pkg_resources.py", line 357, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.7/dist-packages/setuptools-1.1-py2.7.egg/pkg_resources.py", line 2393, in load_entry_point
raise ImportError("Entry point %r not found" % ((group,name),))
ImportError: Entry point ('console_scripts', 'easy_install') not found
我的/usr/local/lib/python2.7/dist-packages
显示了以下安装包:
我不确定从哪里开始,或者为什么我甚至得到这个错误。 我也不确定这个问题是否更适合ServerFault; 但是,由于我在处理一些代码时遇到了这个问题,我想也许其他一些编码器也遇到过它......(当时似乎合乎逻辑)
您似乎已经安装了distribute
和setuptools
,您的easy_install
脚本尝试从distribute
加载入口点,但setuptools
找到setuptools
。
您应该删除distribute
,因为它已合并回setuptools
,现在已过时。 可能之后你需要重新安装setuptools
才能让setuptools
都重新工作。
尝试以下方法:
curl -O http://python-distribute.org/distribute_setup.py
sudo python distribute_setup.py
然后再次运行sudo easy_install MySQL-python。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.