Python 2.7.10 (default, Jul 10 2015, 12:15:16)
[GCC 4.8.4] on linux2
>>> import pandas
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pandas
root@sever002:~# nosetests pandas
======================================================================
ERROR: Failure: ImportError (No module named pandas)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/nose-1.3.7-
py2.7.egg/nose/loader.py", line 407, in loadTestsFromName
module = resolve_name(addr.module)
File "/usr/local/lib/python2.7/site-packages/nose-1.3.7-
py2.7.egg/nose/util.py", line 312, in resolve_name
module = __import__('.'.join(parts_copy))
ImportError: No module named pandas
答案 0 :(得分:2)
首先安装pandas
,然后运行:
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
sudo pip install pandas
然后再次尝试导入pandas
修改强>
仅观察:您可能需要在sudo apt-get install Cython
之前sudo pip install pandas
。