Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

ModuleNotFoundError: No module named 'pandas' (ubuntu)

Am a new user on ubuntu version 20.04.

The fresh install comes with python 3.8, so i upgrade to latest 3.11.

I do the usual pip install pandas.
Note i also try pip3 install pandas for good measure.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

create a test file (called test_pandas.py) which contains this:

import pandas as pd

d = {'a':[1,2,3], 'b':[4,6,8]}
df = pd.Dataframe(d)
print(df)

run file with:

python test_pandas.py

get this error message:

ModuleNotFoundError: No module named 'pandas'

so i run file with this (the for 3.8 version python):

python3 test_pandas.py

and get this:

AttributeError: module 'pandas' has no attribute 'Dataframe'

I have looked in several places (finally this: https://pip.pypa.io/en/stable/installation/), but all fail.

totally lost as what to do.
just want 3.11 (latest version) with a corresponding working pip.

how can i achieve this ?

>Solution :

You have a typo: it’s DataFrame.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading