ModuleNotFoundError: No module named 'pandas' occurs even if pandas is installed on my machine

I am using Ubuntu 16.04. I have python 2.7 and python 3.7 installed on machine. I have installed pandas on my machine. However when I try to import the pandas package it gives ModuleNotFoundError: No module named 'pandas' for both the versions

The output of which python2 is /usr/bin/python2 and that of which python3 is /usr/local/bin/python3

3

1 Answer

You have to remove locally installed python3 by

sudo apt-get install --reinstall python3-minimal
sudo rm /usr/local/bin/python3

and then install python bindings for Pandas with:

sudo apt-get install python-pandas python3-pandas
3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like