Tia
Tia

Reputation: 551

errors with pandas import

I have installed PANDAS using -> pip install --upgrade pandas. "Requirement already up-to-date:--------" But when I use :

import pandas as pd

on spyder this is the error

import pandas as pd
Traceback (most recent call last):
File "<ipython-input-5-7dd3504c366f>", line 1, in <module>
    import pandas as pd
ModuleNotFoundError: No module named 'pandas'

I tried most of the solutions provided on other stackoverflow questions but nothing supposed to be working. please help. Thank you

Upvotes: 0

Views: 3024

Answers (2)

Nayantara Jeyaraj
Nayantara Jeyaraj

Reputation: 2716

The most common reasons to encounter this error is the incompatibility of pip installs and python versions.

Though the error log mentions that your pandas module is not available even after you've installed it, there is a possibility to run into this error is due to the presence of multiple/incompatible versions of python where you've failed to install pandas according to the specific python version.

So first check the python version that you're currently on using

python -V

And if you're on Python 2. , use

pip install pandas

If you're on Python 3. use

pip3 install pandas.

Then proceed on with your script. This at most should solve your issue.

Upvotes: 1

Patel
Patel

Reputation: 200

There must be two different pythons on your system 1) Anaconda 2) From Python.exe

Try to install pandas from conda command window.

Upvotes: 0

Related Questions