ModuleNotFoundError: No module named 'pandas'

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) deepak@deepak-VirtualBox:~/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) deepak@deepak-VirtualBox:~/textgeneration$

Thanks









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 '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 '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-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-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-compat'
ModuleNotFoundError: No module named 'pandas-compat'  Hi, My... 'pandas-compat' How to remove the ModuleNotFoundError: No module named... the installation of pandas-compat python library, ModuleNotFoundError: No module named '
ModuleNotFoundError: No module named 'pandas_confusion'
ModuleNotFoundError: No module named 'pandas_confusion'  Hi, My... named 'pandas_confusion' How to remove the ModuleNotFoundError: No module...: No module named 'pandas_confusion' error will be solved. Thanks
ModuleNotFoundError: No module named 'pandas-cub'
ModuleNotFoundError: No module named 'pandas-cub'  Hi, My Python... 'pandas-cub' How to remove the ModuleNotFoundError: No module named '...-cub python library, ModuleNotFoundError: No module named 'pandas-cub'
ModuleNotFoundError: No module named 'pandas-datadict'
ModuleNotFoundError: No module named 'pandas-datadict'  Hi, My... named 'pandas-datadict' How to remove the ModuleNotFoundError: No module named... the installation of pandas-datadict python library, ModuleNotFoundError: No module
ModuleNotFoundError: No module named 'pandas-datareader'
ModuleNotFoundError: No module named 'pandas-datareader'  Hi, My... named 'pandas-datareader' How to remove the ModuleNotFoundError: No module...: No module named 'pandas-datareader' error will be solved. Thanks
ModuleNotFoundError: No module named 'pandas-dedupe'
ModuleNotFoundError: No module named 'pandas-dedupe'  Hi, My... 'pandas-dedupe' How to remove the ModuleNotFoundError: No module named... the installation of pandas-dedupe python library, ModuleNotFoundError: No module named '
ModuleNotFoundError: No module named 'pandas_degreedays'
ModuleNotFoundError: No module named 'pandas_degreedays'  Hi, My... named 'pandas_degreedays' How to remove the ModuleNotFoundError: No module...: No module named 'pandas_degreedays' error will be solved. Thanks
ModuleNotFoundError: No module named 'pandas-diligent'
ModuleNotFoundError: No module named 'pandas-diligent'  Hi, My... named 'pandas-diligent' How to remove the ModuleNotFoundError: No module named... the installation of pandas-diligent python library, ModuleNotFoundError: No module
ModuleNotFoundError: No module named 'pandas-express'
ModuleNotFoundError: No module named 'pandas-express'  Hi, My... named 'pandas-express' How to remove the ModuleNotFoundError: No module named... the installation of pandas-express python library, ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'pandas-ext'
ModuleNotFoundError: No module named 'pandas-ext'  Hi, My Python... 'pandas-ext' How to remove the ModuleNotFoundError: No module named '...-ext python library, ModuleNotFoundError: No module named 'pandas-ext'
ModuleNotFoundError: No module named 'pandas-extras'
ModuleNotFoundError: No module named 'pandas-extras'  Hi, My... 'pandas-extras' How to remove the ModuleNotFoundError: No module named... the installation of pandas-extras python library, ModuleNotFoundError: No module named '
ModuleNotFoundError: No module named 'pandas-files'
ModuleNotFoundError: No module named 'pandas-files'  Hi, My Python... 'pandas-files' How to remove the ModuleNotFoundError: No module named '... of pandas-files python library, ModuleNotFoundError: No module named 'pandas
ModuleNotFoundError: No module named 'pandas-flavor'
ModuleNotFoundError: No module named 'pandas-flavor'  Hi, My... 'pandas-flavor' How to remove the ModuleNotFoundError: No module named... the installation of pandas-flavor python library, ModuleNotFoundError: No module named '
ModuleNotFoundError: No module named 'pandas-fpl'
ModuleNotFoundError: No module named 'pandas-fpl'  Hi, My Python... 'pandas-fpl' How to remove the ModuleNotFoundError: No module named '...-fpl python library, ModuleNotFoundError: No module named 'pandas-fpl'
ModuleNotFoundError: No module named 'pandas-gbq'
ModuleNotFoundError: No module named 'pandas-gbq'  Hi, My Python... 'pandas-gbq' How to remove the ModuleNotFoundError: No module named '...-gbq python library, ModuleNotFoundError: No module named 'pandas-gbq'
ModuleNotFoundError: No module named 'pandas-helpers'
ModuleNotFoundError: No module named 'pandas-helpers'  Hi, My... named 'pandas-helpers' How to remove the ModuleNotFoundError: No module named... the installation of pandas-helpers python library, ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'pandas-highcharts'
ModuleNotFoundError: No module named 'pandas-highcharts'  Hi, My... named 'pandas-highcharts' How to remove the ModuleNotFoundError: No module...: No module named 'pandas-highcharts' error will be solved. Thanks
ModuleNotFoundError: No module named 'pandas-htools'
ModuleNotFoundError: No module named 'pandas-htools'  Hi, My... 'pandas-htools' How to remove the ModuleNotFoundError: No module named... the installation of pandas-htools python library, ModuleNotFoundError: No module named '
ModuleNotFoundError: No module named 'pandas-io'
ModuleNotFoundError: No module named 'pandas-io'  Hi, My Python... 'pandas-io' How to remove the ModuleNotFoundError: No module named 'pandas... python library, ModuleNotFoundError: No module named 'pandas-io' error
ModuleNotFoundError: No module named 'pandas-jalali'
ModuleNotFoundError: No module named 'pandas-jalali'  Hi, My... 'pandas-jalali' How to remove the ModuleNotFoundError: No module named... the installation of pandas-jalali python library, ModuleNotFoundError: No module named '
ModuleNotFoundError: No module named 'pandas-light'
ModuleNotFoundError: No module named 'pandas-light'  Hi, My Python... 'pandas-light' How to remove the ModuleNotFoundError: No module named '... of pandas-light python library, ModuleNotFoundError: No module named 'pandas
ModuleNotFoundError: No module named 'pandas-linker'
ModuleNotFoundError: No module named 'pandas-linker'  Hi, My... 'pandas-linker' How to remove the ModuleNotFoundError: No module named... the installation of pandas-linker python library, ModuleNotFoundError: No module named '
ModuleNotFoundError: No module named 'pandas-lite'
ModuleNotFoundError: No module named 'pandas-lite'  Hi, My Python... 'pandas-lite' How to remove the ModuleNotFoundError: No module named '... of pandas-lite python library, ModuleNotFoundError: No module named 'pandas-lite
ModuleNotFoundError: No module named 'pandas-log'
ModuleNotFoundError: No module named 'pandas-log'  Hi, My Python... 'pandas-log' How to remove the ModuleNotFoundError: No module named '...-log python library, ModuleNotFoundError: No module named 'pandas-log'
ModuleNotFoundError: No module named 'pandas-lookup'
ModuleNotFoundError: No module named 'pandas-lookup'  Hi, My... 'pandas-lookup' How to remove the ModuleNotFoundError: No module named... the installation of pandas-lookup python library, ModuleNotFoundError: No module named '
ModuleNotFoundError: No module named 'pandas-mapper'
ModuleNotFoundError: No module named 'pandas-mapper'  Hi, My... 'pandas-mapper' How to remove the ModuleNotFoundError: No module named... the installation of pandas-mapper python library, ModuleNotFoundError: No module named '
ModuleNotFoundError: No module named 'pandas_mate'
ModuleNotFoundError: No module named 'pandas_mate'  Hi, My Python... 'pandas_mate' How to remove the ModuleNotFoundError: No module named '... of pandas_mate python library, ModuleNotFoundError: No module named 'pandas_mate
ModuleNotFoundError: No module named 'pandas-ml'
ModuleNotFoundError: No module named 'pandas-ml'  Hi, My Python... 'pandas-ml' How to remove the ModuleNotFoundError: No module named 'pandas... python library, ModuleNotFoundError: No module named 'pandas-ml' error
ModuleNotFoundError: No module named 'pandas-montecarlo'
ModuleNotFoundError: No module named 'pandas-montecarlo'  Hi, My... named 'pandas-montecarlo' How to remove the ModuleNotFoundError: No module...: No module named 'pandas-montecarlo' error will be solved. Thanks
ModuleNotFoundError: No module named 'pandas-msgpack'
ModuleNotFoundError: No module named 'pandas-msgpack'  Hi, My... named 'pandas-msgpack' How to remove the ModuleNotFoundError: No module named... the installation of pandas-msgpack python library, ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'pandas-mssql'
ModuleNotFoundError: No module named 'pandas-mssql'  Hi, My Python... 'pandas-mssql' How to remove the ModuleNotFoundError: No module named '... of pandas-mssql python library, ModuleNotFoundError: No module named 'pandas
ModuleNotFoundError: No module named 'pandas-multi'
ModuleNotFoundError: No module named 'pandas-multi'  Hi, My Python... 'pandas-multi' How to remove the ModuleNotFoundError: No module named '... of pandas-multi python library, ModuleNotFoundError: No module named 'pandas
ModuleNotFoundError: No module named 'pandas-multiprocess'
ModuleNotFoundError: No module named 'pandas-multiprocess'  Hi, My...: No module named 'pandas-multiprocess' error? Thanks   Hi..., ModuleNotFoundError: No module named 'pandas-multiprocess' error
ModuleNotFoundError: No module named 'pandas-multiprocessing'
ModuleNotFoundError: No module named 'pandas-multiprocessing'  Hi...: No module named 'pandas-multiprocessing' How to remove the ModuleNotFoundError: No module named 'pandas-multiprocessing' error? Thanks   Hi
ModuleNotFoundError: No module named 'pandas-npi'
ModuleNotFoundError: No module named 'pandas-npi'  Hi, My Python... 'pandas-npi' How to remove the ModuleNotFoundError: No module named '...-npi python library, ModuleNotFoundError: No module named 'pandas-npi'
ModuleNotFoundError: No module named 'pandas-oracle'
ModuleNotFoundError: No module named 'pandas-oracle'  Hi, My... 'pandas-oracle' How to remove the ModuleNotFoundError: No module named... the installation of pandas-oracle python library, ModuleNotFoundError: No module named '
ModuleNotFoundError: No module named 'pandas-parallel'
ModuleNotFoundError: No module named 'pandas-parallel'  Hi, My... named 'pandas-parallel' How to remove the ModuleNotFoundError: No module named... the installation of pandas-parallel python library, ModuleNotFoundError: No module
ModuleNotFoundError: No module named 'pandas-path'
ModuleNotFoundError: No module named 'pandas-path'  Hi, My Python... 'pandas-path' How to remove the ModuleNotFoundError: No module named '... of pandas-path python library, ModuleNotFoundError: No module named 'pandas-path
ModuleNotFoundError: No module named 'pandas-plink'
ModuleNotFoundError: No module named 'pandas-plink'  Hi, My Python... 'pandas-plink' How to remove the ModuleNotFoundError: No module named '... of pandas-plink python library, ModuleNotFoundError: No module named 'pandas

Ads