英文:
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.
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?
英文:
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.
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 ?
答案1
得分: 1
你有一个拼写错误:应该是 DataFrame
。
英文:
You have a typo: it's DataFrame
.
答案2
得分: 0
在一些查找后,我注意到其他Stack帖子建议您安装wheel
,然后再安装pandas
。您可以尝试这样做。
英文:
After some looking around, I noticed other Stack posts are suggesting you install wheel
and then pandas
. You could try that.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论