pycharm项目解释器有请求,但ModuleNotFoundError:没有名为“requests”的模块

2024-09-28 19:31:22 发布

您现在位置:Python中文网/ 问答频道 /正文

这在Macos上

我的项目口译员位于:

Pycharm>;偏好>;项目口译员

Python 3.7 (Evohome) ~ /Evohome/bin/python   ##### Evohome is my project name
Package       Version etc
certifi
chardet
idna
pip
requests
setuptools
urllib3

如果我运行脚本:

import requests

导入请求的结果是此处出现此错误。

ModuleNotFoundError: No module named 'requests'
```

So, I can't get past the first bit after which I want to
import JSON


**if I run this code**
```
x = help("modules")
print(x)
exit(0)
```
**The Result from this is**
```
/Users/Jeff/venv/bin/python /Users/Jeff/Documents/Pycharm/EvoHome/Test1.py

Please wait a moment while I gather a list of all available modules...

```
*massive list of available modules*
```
Enter any module name to get more help.  Or, type "modules spam" to search
for modules whose name or summary contain the string "spam".

None

Process finished with exit code 0
```

Tags: theto项目nameimportgtmodulesget