ModuleNotFoundError: No module named 'pandas'

Ads
 

ModuleNotFoundError: No module named 'pandas'

Hi,

I have been assigned work on python pandas and there is already written code. Which throws following error:

ModuleNotFoundError: No module named 'pandas'

More details about the error:

Traceback (most recent call last):
  File "1.py", line 36, in <module>
    import pandas as pd
ModuleNotFoundError: No module named 'pandas'

What is this error and how to get rid of it?

Thanks

View Answers

January 19, 2019 at 10:02 PM

HI,

Pandas is python library which can read data from may different data source like a CSV or TSV file, or a SQL database etc.. It then converts data into pandas data frames.

In your case error is coming because pandas is not installed with your python distribution.

You can install pandas python with following command:

pip install pandas

Before writing answer here I tested the installing and pandas was successfully install with above command.

Here is my installation log:

(tf12) [email protected]:~/textgeneration$ pip install pandas
Collecting pandas
  Downloading https://files.pythonhosted.org/packages/e1/d8/feeb346d41f181e83fba45224ab14a8d8af019b48af742e047f3845d8cff/pandas-0.23.4-cp36-cp36m-manylinux1_x86_64.whl (8.9MB)
    100% | 8.9MB 683kB/s 
Requirement already satisfied: numpy>=1.9.0 in /home/deepak/anaconda3/envs/tf12/lib/python3.6/site-packages (from pandas) (1.16.0)
Requirement already satisfied: python-dateutil>=2.5.0 in /home/deepak/anaconda3/envs/tf12/lib/python3.6/site-packages (from pandas) (2.7.5)
Collecting pytz>=2011k (from pandas)
  Downloading https://files.pythonhosted.org/packages/61/28/1d3920e4d1d50b19bc5d24398a7cd85cc7b9a75a490570d5a30c57622d34/pytz-2018.9-py2.py3-none-any.whl (510kB)
    100% | 512kB 1.3MB/s 
Requirement already satisfied: six>=1.5 in /home/deepak/anaconda3/envs/tf12/lib/python3.6/site-packages (from python-dateutil>=2.5.0->pandas) (1.12.0)
Installing collected packages: pytz, pandas
Successfully installed pandas-0.23.4 pytz-2018.9
(tf12) [email protected]:~/textgeneration$

Thanks

Ads









Related Tutorials/Questions & Answers:
ModuleNotFoundError: No module named 'pandas'
ModuleNotFoundError: No module named 'pandas'  Hi, My Python... 'pandas' How to remove the ModuleNotFoundError: No module named 'pandas'..., ModuleNotFoundError: No module named 'pandas' error will be solved. Thanks
ModuleNotFoundError: No module named 'pandas'
ModuleNotFoundError: No module named 'pandas'  Hi, I have been... following error: ModuleNotFoundError: No module named 'pandas' More details about...;module> import pandas as pd ModuleNotFoundError: No module named 'pandas
Advertisements
ModuleNotFoundError: No module named 'pandas'
ModuleNotFoundError: No module named 'pandas'  Hi, I have been... following error: ModuleNotFoundError: No module named 'pandas' More details about...;module> import pandas as pd ModuleNotFoundError: No module named 'pandas
ModuleNotFoundError: No module named 'athletic_pandas'
ModuleNotFoundError: No module named 'athletic_pandas'  Hi, My... named 'athletic_pandas' How to remove the ModuleNotFoundError: No module named... the installation of athletic_pandas python library, ModuleNotFoundError: No module
ModuleNotFoundError: No module named 'behave-pandas'
ModuleNotFoundError: No module named 'behave-pandas'  Hi, My... 'behave-pandas' How to remove the ModuleNotFoundError: No module named... the installation of behave-pandas python library, ModuleNotFoundError: No module named '
ModuleNotFoundError: No module named 'behave-pandas'
ModuleNotFoundError: No module named 'behave-pandas'  Hi, My... 'behave-pandas' How to remove the ModuleNotFoundError: No module named... the installation of behave-pandas python library, ModuleNotFoundError: No module named '
ModuleNotFoundError: No module named 'clean-pandas'
ModuleNotFoundError: No module named 'clean-pandas'  Hi, My Python... 'clean-pandas' How to remove the ModuleNotFoundError: No module named '... of clean-pandas python library, ModuleNotFoundError: No module named 'clean
ModuleNotFoundError: No module named 'clean-pandas'
ModuleNotFoundError: No module named 'clean-pandas'  Hi, My Python... 'clean-pandas' How to remove the ModuleNotFoundError: No module named '... of clean-pandas python library, ModuleNotFoundError: No module named 'clean
ModuleNotFoundError: No module named 'dagster-pandas'
ModuleNotFoundError: No module named 'dagster-pandas'  Hi, My... named 'dagster-pandas' How to remove the ModuleNotFoundError: No module named... the installation of dagster-pandas python library, ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'django-pandas'
ModuleNotFoundError: No module named 'django-pandas'  Hi, My... 'django-pandas' How to remove the ModuleNotFoundError: No module named... the installation of django-pandas python library, ModuleNotFoundError: No module named '
ModuleNotFoundError: No module named 'eda-pandas'
ModuleNotFoundError: No module named 'eda-pandas'  Hi, My Python... 'eda-pandas' How to remove the ModuleNotFoundError: No module named 'eda...-pandas python library, ModuleNotFoundError: No module named 'eda-pandas'
ModuleNotFoundError: No module named 'es-pandas'
ModuleNotFoundError: No module named 'es-pandas'  Hi, My Python...-pandas' How to remove the ModuleNotFoundError: No module named 'es... python library, ModuleNotFoundError: No module named 'es-pandas' error
ModuleNotFoundError: No module named 'factory_pandas'
ModuleNotFoundError: No module named 'factory_pandas'  Hi, My... named 'factory_pandas' How to remove the ModuleNotFoundError: No module named... the installation of factory_pandas python library, ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'fast-pandas'
ModuleNotFoundError: No module named 'fast-pandas'  Hi, My Python... 'fast-pandas' How to remove the ModuleNotFoundError: No module named '...-pandas python library, ModuleNotFoundError: No module named 'fast-pandas
ModuleNotFoundError: No module named 'fuzzy-pandas'
ModuleNotFoundError: No module named 'fuzzy-pandas'  Hi, My Python... 'fuzzy-pandas' How to remove the ModuleNotFoundError: No module named '... of fuzzy-pandas python library, ModuleNotFoundError: No module named 'fuzzy
ModuleNotFoundError: No module named 'git-pandas'
ModuleNotFoundError: No module named 'git-pandas'  Hi, My Python... 'git-pandas' How to remove the ModuleNotFoundError: No module named 'git...-pandas python library, ModuleNotFoundError: No module named 'git-pandas'
ModuleNotFoundError: No module named 'gspread-pandas'
ModuleNotFoundError: No module named 'gspread-pandas'  Hi, My... named 'gspread-pandas' How to remove the ModuleNotFoundError: No module named... the installation of gspread-pandas python library, ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'happy-pandas'
ModuleNotFoundError: No module named 'happy-pandas'  Hi, My Python... 'happy-pandas' How to remove the ModuleNotFoundError: No module named '... of happy-pandas python library, ModuleNotFoundError: No module named 'happy
ModuleNotFoundError: No module named 'ie-pandas'
ModuleNotFoundError: No module named 'ie-pandas'  Hi, My Python...-pandas' How to remove the ModuleNotFoundError: No module named 'ie... python library, ModuleNotFoundError: No module named 'ie-pandas' error
ModuleNotFoundError: No module named 'jsontableschema-pandas'
ModuleNotFoundError: No module named 'jsontableschema-pandas'  Hi...: No module named 'jsontableschema-pandas' How to remove the ModuleNotFoundError: No module named 'jsontableschema-pandas' error? Thanks   Hi
ModuleNotFoundError: No module named 'keras-pandas'
ModuleNotFoundError: No module named 'keras-pandas'  Hi, My Python... 'keras-pandas' How to remove the ModuleNotFoundError: No module named '... of keras-pandas python library, ModuleNotFoundError: No module named 'keras
ModuleNotFoundError: No module named 'mmal-pandas'
ModuleNotFoundError: No module named 'mmal-pandas'  Hi, My Python... 'mmal-pandas' How to remove the ModuleNotFoundError: No module named '...-pandas python library, ModuleNotFoundError: No module named 'mmal-pandas
ModuleNotFoundError: No module named 'opulent-pandas'
ModuleNotFoundError: No module named 'opulent-pandas'  Hi, My... named 'opulent-pandas' How to remove the ModuleNotFoundError: No module named... the installation of opulent-pandas python library, ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'otis-pandas'
ModuleNotFoundError: No module named 'otis-pandas'  Hi, My Python... 'otis-pandas' How to remove the ModuleNotFoundError: No module named '...-pandas python library, ModuleNotFoundError: No module named 'otis-pandas
ModuleNotFoundError: No module named 'pandas_access'
ModuleNotFoundError: No module named 'pandas_access'  Hi, My... 'pandas_access' How to remove the ModuleNotFoundError: No module named... the installation of pandas_access python library, ModuleNotFoundError: No module named '
ModuleNotFoundError: No module named 'pandas-anaphora'
ModuleNotFoundError: No module named 'pandas-anaphora'  Hi, My... named 'pandas-anaphora' How to remove the ModuleNotFoundError: No module named... the installation of pandas-anaphora python library, ModuleNotFoundError: No module
ModuleNotFoundError: No module named 'pandas-bamboo'
ModuleNotFoundError: No module named 'pandas-bamboo'  Hi, My... 'pandas-bamboo' How to remove the ModuleNotFoundError: No module named... the installation of pandas-bamboo python library, ModuleNotFoundError: No module named '
ModuleNotFoundError: No module named 'pandas-bj'
ModuleNotFoundError: No module named 'pandas-bj'  Hi, My Python... 'pandas-bj' How to remove the ModuleNotFoundError: No module named 'pandas... python library, ModuleNotFoundError: No module named 'pandas-bj' error
ModuleNotFoundError: No module named 'pandas-bokeh'
ModuleNotFoundError: No module named 'pandas-bokeh'  Hi, My Python... 'pandas-bokeh' How to remove the ModuleNotFoundError: No module named '... of pandas-bokeh python library, ModuleNotFoundError: No module named 'pandas
ModuleNotFoundError: No module named 'pandas-cache'
ModuleNotFoundError: No module named 'pandas-cache'  Hi, My Python... 'pandas-cache' How to remove the ModuleNotFoundError: No module named '... of pandas-cache python library, ModuleNotFoundError: No module named 'pandas
ModuleNotFoundError: No module named 'pandas-charm'
ModuleNotFoundError: No module named 'pandas-charm'  Hi, My Python... 'pandas-charm' How to remove the ModuleNotFoundError: No module named '... of pandas-charm python library, ModuleNotFoundError: No module named 'pandas

Ads