[英]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.