Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python ModuleNotFoundError:没有名为';请求';_Python_Visual Studio Code_Request_Interpreter - Fatal编程技术网

Python ModuleNotFoundError:没有名为';请求';

Python ModuleNotFoundError:没有名为';请求';,python,visual-studio-code,request,interpreter,Python,Visual Studio Code,Request,Interpreter,我似乎无法在python 3.7.7中运行此代码 import panda as pd all_data = pd.read_csv('gas_prices.csv') print(all_data) 回溯(最近一次呼叫最后一次): 文件“c:/Users/HP/Desktop/VSc Code/Understanding pand/Sales_analysis/sale_data.py”,第1行,在 作为pd导入熊猫 文件“C:\Users\HP\AppData\Local\Progr

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

import panda as pd 

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

print(all_data)
回溯(最近一次呼叫最后一次):
文件“c:/Users/HP/Desktop/VSc Code/Understanding pand/Sales_analysis/sale_data.py”,第1行,在
作为pd导入熊猫
文件“C:\Users\HP\AppData\Local\Programs\Python\37\lib\site packages\panda\\uuuuuuu init\uuuuuuuuuu.py”,第1行,在
从请求导入PandaRequest
ModuleNotFoundError:没有名为“请求”的模块
我试图更换解释器,但似乎没有什么不同,我认为我不在虚拟环境中


这在几天前起作用,但突然出现了此错误。

根据使用:pip安装请求

您已手动安装了部分panda,并意外地将其命名为“panda”。而是使用工具
pip
,它包含在Python 3.7.7中。像这样:

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

祝你好运

它是
panda
而不是
panda
将熊猫作为pd导入
真不敢相信我犯了这么愚蠢的错误,非常感谢!
C:\> C:\Users\HP\AppData\Local\Programs\Python\Python37\Scripts\pip.exe install pandas