ImportError: No module named pandas

You're missing a few (not terribly clear) steps. Pandas is distributed through pip as a wheel, which means you need to do:

pip install wheel
pip install pandas

You're probably going to run into other issues after this - it looks like you're installing on Windows which isn't the most friendly of targets for NumPy, SciPy, and Pandas. Alternatively, you could pickup a binary installer from here.

You also had an error installing NumPy. Like before, I recommend grabbing a binary installer for this, as it's not a simple process. However, you can resolve your current error by installing this package from Microsoft.

While it's completely possible to get a perfect environment setup on Windows, I have found the quality-of-life for a Python developer is vastly improved by setting up a Debian VM. Especially with the scientific packages, you will run into many cases like this.


I just had the problem and I kept installing and uninstalling. It turns out the problem happens when you're installing Pandas to a version of python and trying to run the program using another python version.

So to start off, run:

which python
python --version
which pip

make sure both are aligned, most probably, python is 2.7 and pip is working on 3.x or pip is coming from anaconda's python version which is highly likely to be 3.x as well

In case of python redirects to 2.7, and pip redirects to pip3, install pandas using pip install pandas and use python3 file_name.py to run the program.


I fixed the same problem with the below commands...

Type python on your terminal. If you see python version 2.x, then run these two commands to install Pandas:

sudo python -m pip install wheel

and

sudo python -m pip install pandas

Else if you see python version 3.x, then run these two commands to install Pandas:

sudo python3 -m pip install wheel

and

sudo python3 -m pip install pandas

Good Luck!


When I try to build the docker image zeppelin-highcharts, I find that the base image openjdk:8 also does not have pandas installed. I solved it with this steps.

curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | python
pip install pandas

I referred to What is the official “preferred” way to install pip and virtualenv systemwide?.