Jenkins构建失败,'requests'ModuleNotFoundError
来源:13-2 项目配置
慕瓜3274171
2020-04-10
老师,
在VS Code中运行没有问题,在jenkins中构建失败,环境变量“D:\www\ImoocInterface”已经配置。
Running as SYSTEM
Building in workspace D:\www\ImoocInterface
[ImoocInterface] $ cmd /c call C:\Windows\TEMP\jenkins2079538978082439096.bat
D:\www\ImoocInterface>python Run/run_main.py
Traceback (most recent call last):
File “Run/run_main.py”, line 11, in
from Base.base_request import request
File “D:\www\ImoocInterface\Base\base_request.py”, line 10, in
import requests
ModuleNotFoundError: No module named ‘requests’
写回答
1回答
-
Mushishi
2020-04-10
import requests 你的代码里面是不是在虚拟环境执行的,但是你python正常环境没有requests啊
022022-05-19
相似问题