突然间我无法导入numpy或pip或许多其他包! 所有返回导入错误。
which python
/usr/bin/python
which pip
/home/user/anaconda2/bin/pip
python -V
Python 2.7.11+
pip -V
pip 8.0.2+gx2 from /home/user/anaconda2/lib/python2.7/site-packages (python 2.7)
conda search numpy
numpy 1.10.4
我该如何解决这个问题?我可以尝试一下吗?您需要哪些其他信息?
例如:
import pip
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pip
import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named numpy
print sys.path
['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']
答案 0 :(得分:0)
我以某种方式重现错误,如果你在/ home / user / anaconda2 / bin中使用python而不是/ usr / bin,它应该没问题