Python 3.x ModuleNotFoundError:没有名为';请求';在Jenkins中使用pyinstaller
我目前正在使用Jenkins管道来自动化我的应用程序的构建、测试和交付阶段。我正在尝试使用Python 3.x ModuleNotFoundError:没有名为';请求';在Jenkins中使用pyinstaller,python-3.x,jenkins,python-requests,pyinstaller,dsl,Python 3.x,Jenkins,Python Requests,Pyinstaller,Dsl,我目前正在使用Jenkins管道来自动化我的应用程序的构建、测试和交付阶段。我正在尝试使用Python3中的请求库。在PyCharm中,我的程序运行得非常好,但是在完成交付阶段后,我得到了ModuleNotFoundError:No module named'requests'错误,运行.exe。我尝试在通过Jenkins文件运行的pyinstaller脚本中隐藏导入请求模块,并尝试升级/降级pyinstaller和请求。我错过什么了吗?下面是我的管道交付阶段的代码 stage('Deliver
Python3
中的请求
库。在PyCharm中,我的程序运行得非常好,但是在完成交付阶段后,我得到了ModuleNotFoundError:No module named'requests'
错误,运行.exe
。我尝试在通过Jenkins文件运行的pyinstaller脚本中隐藏导入请求模块,并尝试升级/降级pyinstaller和请求。我错过什么了吗?下面是我的管道交付阶段的代码
stage('Deliver') {
agent any
environment {
VOLUME = '$(pwd):/src/'
IMAGE = 'cdrx/pyinstaller-windows:python3'
}
steps {
dir(path: env.BUILD_ID) {
unstash(name: 'compiled-results')
sh "docker run --rm -v ${VOLUME} ${IMAGE} 'pyinstaller -F pollut_api.py --hidden-import requests -y'"
}
}
post {
success {
archiveArtifacts "${env.BUILD_ID}/dist/*"
sh "docker run --rm -v ${VOLUME} ${IMAGE} 'rm -rf build dist'"
}
}
}