Reputation: 11
I'm stuck with a python virtual env installation and particularly pandas.
Pip list: numpy (1.14.2) pandas (0.22.0) pip (9.0.1)
Python 3.6.4 (default, Mar 12 2018, 17:59:42)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/me/tensorflow/lib/python3.6/site-packages/pandas/__init__.py", line 23, in <module>
from pandas.compat.numpy import *
ModuleNotFoundError: No module named 'pandas.compat.numpy'
>>>
Upvotes: 1
Views: 4275
Reputation: 1089
You probably have several installations of pandas (using apt and using pip)
Remove all:
sudo apt-get purge python3-pandas
sudo pip3 uninstall pandas
Install using pip3:
sudo pip3 install pandas
Try the following and it should work
python3
>>import pandas
Upvotes: 1