1
我正在嘗試設置linux的pip。 我對系統蟒蛇12.7.12,PIP是系統即使安裝正確,pip也不能正常工作
~/Desktop # sudo easy_install pip
install_dir /usr/local/lib/python2.7/site-packages/
Searching for pip
Best match: pip 9.0.1
Processing pip-9.0.1-py2.7.egg
pip 9.0.1 is already the active version in easy-install.pth
Installing pip script to /usr/local/bin
Installing pip2.7 script to /usr/local/bin
Installing pip2 script to /usr/local/bin
從這裏上安裝它看起來PIP正確安裝,但是當我試圖使用PIP那麼它會拋出錯誤。
pip -V
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==9.0.1', 'console_scripts', 'pip')()
File "/usr/local/lib/python2.7/site-packages/distribute-0.6.14-py2.7.egg/pkg_resources.py", line 305, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.7/site-packages/distribute-0.6.14-py2.7.egg/pkg_resources.py", line 2244, in load_entry_point
return ep.load()
File "/usr/local/lib/python2.7/site-packages/distribute-0.6.14-py2.7.egg/pkg_resources.py", line 1954, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/local/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg/pip/__init__.py", line 28, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/local/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg/pip/vcs/mercurial.py", line 9, in <module>
from pip.download import path_to_url
File "/usr/local/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg/pip/download.py", line 36, in <module>
from pip.utils.glibc import libc_ver
File "/usr/local/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg/pip/utils/glibc.py", line 4, in <module>
import ctypes
File "/usr/local/lib/python2.7/ctypes/__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
****ImportError: /usr/local/lib/python2.7/lib-dynload/_ctypes.so: undefined symbol: PyUnicodeUCS2_FromUnicode****
謝謝,我做了一個乾淨的安裝我的系統,然後只有1版本的Python在那裏,一切正常。 – hellrocker
@hellrocker太棒了,很高興你能工作! – welshGaz