ModuleNotFoundError: No module named #39;requests#39; after pip install(ModuleNotFoundError:pip 安装后没有名为“请求的模块)
问题描述
我知道以前有人问过类似的问题,但我找不到解决问题的方法.
I know similar questions have been asked before but I couldn't find the solution to my problem.
我在尝试导入请求后收到以下错误消息:
I am getting the following error message after trying to import requests:
C:UsersJmPycharmProjectsTestvenvScriptspython.exe C:/Users/Jm/PycharmProjects/Test/Test_001
Traceback (most recent call last):
File "C:/Users/Jm/PycharmProjects/Test/Test_001", line 1, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
我只安装了一个版本的python,python -m pip
install requests 说所有的要求都已经满足了.
I only have one version of python installed and python -m pip
install requests is saying all the requirements are already satisfied.
推荐答案
运行这段代码:
C:UsersJmPycharmProjectsTestvenvScriptspython.exe -m pip install requests
这会强制安装目录到您的 python 安装.
This forces the installation directory to your python install.
这与简单的 python -m pip install requests
这篇关于ModuleNotFoundError:pip 安装后没有名为“请求"的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:ModuleNotFoundError:pip 安装后没有名为“请求"的
基础教程推荐
- Dask.array.套用_沿_轴:由于额外的元素([1]),使用dask.array的每一行作为另一个函数的输入失败 2022-01-01
- 使用PyInstaller后在Windows中打开可执行文件时出错 2022-01-01
- 如何让 python 脚本监听来自另一个脚本的输入 2022-01-01
- 如何在海运重新绘制中自定义标题和y标签 2022-01-01
- 在 Python 中,如果我在一个“with"中返回.块,文件还会关闭吗? 2022-01-01
- Python kivy 入口点 inflateRest2 无法定位 libpng16-16.dll 2022-01-01
- 筛选NumPy数组 2022-01-01
- 何时使用 os.name、sys.platform 或 platform.system? 2022-01-01
- 线程时出现 msgbox 错误,GUI 块 2022-01-01
- 用于分类数据的跳跃记号标签 2022-01-01