ModuleNotFoundError:pip安装后没有名为“请求"的模块 [英] ModuleNotFoundError: No module named 'requests' after pip install

查看:58
本文介绍了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:\Users\Jm\PycharmProjects\Test\venv\Scripts\python.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 安装请求说所有要求都已经满足.

I only have one version of python installed and python -m pip install requests is saying all the requirements are already satisfied.

提前致谢.

推荐答案

运行此代码:

C:\Users\Jm\PycharmProjects\Test\venv\Scripts\python.exe -m pip install requests

这会强制安装目录到您的 python 安装.

This forces the installation directory to your python install.

这与简单的 python -m pip install requests

这篇关于ModuleNotFoundError:pip安装后没有名为“请求"的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆