ModuleNotFoundError:没有名为“ request”的模块

我似乎无法在python 3.7.7中运行此代码

import panda as pd 

all_data = pd.read_csv('gas_prices.csv')

print(all_data)
Traceback (most recent call last):
  File "c:/Users/HP/Desktop/VSc Code/Understanding pand/Sales_analysis/sale_data.py", line 1, in <module>
    import panda as pd
  File "C:\Users\HP\AppData\Local\Programs\Python\Python37\lib\site-packages\panda\__init__.py", line 1, in <module>
    from request import PandaRequest
ModuleNotFoundError: No module named 'request'

我尝试更改解释器,但似乎没有什么不同,而且我不认为自己处于虚拟环境中。

几天前这已经在起作用,但突然开始出现此错误。

评论
望_
望_

accourding to pypi use : pip install request

点赞
评论
eearum
eearum

You've manually installed part of pandas and accidentally named it "panda". Instead use the tool pip, which in Python 3.7.7 is included. Like so:

C:\> C:\Users\HP\AppData\Local\Programs\Python\Python37\Scripts\pip.exe install pandas

祝好运!

点赞
评论