1

I am trying to import pandas on Python (Linux) but it is giving me the following error:

ModuleNotFoundError
Traceback (most recent call last) in () 1 import pandas as pd ModuleNotFoundError: No module named 'pandas'

Yash
  • 3,208
  • 2
  • 14
  • 30
Bilal K
  • 179
  • 10
  • 2
    did you install pandas? – ashish14 Sep 30 '19 at 12:29
  • 2
    Possible duplicate of [How to install pandas for Python 3?](https://stackoverflow.com/questions/38768996/how-to-install-pandas-for-python-3) – Prathik Kini Sep 30 '19 at 12:32
  • Possible duplicate of [ImportError: No module named pandas](https://stackoverflow.com/questions/33481974/importerror-no-module-named-pandas) – koen Sep 30 '19 at 13:45

2 Answers2

5

try below code to install pandas.

sudo pip3 install pandas

Above code work for me .

Aditya
  • 557
  • 2
  • 13
2

Try installing with this:

pip install pandas

If the install fails due to lacking privilege, do this:

sudo pip install pandas

Note: You may have to use pip3 is your default Python version is 2.X

Yash
  • 3,208
  • 2
  • 14
  • 30