python-3.x - python3-venv在项目中的安装位置
问题描述
我正在使用 jenkins 文件来运行烟雾测试
def runSmokeTest(environment) {
docker.image("python:3.7").inside {
withCredentials([usernamePassword(credentialsId: "inhome_smoketest_authz_${environment}",
usernameVariable: 'CLIENT_ID', passwordVariable: 'CLIENT_SECRET')]) {
sh "make smoketest CLIENT_ID=$CLIENT_ID CLIENT_SECRET=$CLIENT_SECRET ENV=${environment}"
}
}
}
我在其中遇到错误
make smoketest CLIENT_ID=**** CLIENT_SECRET=**** ENV=acceptance
The virtual environment was not created successfully because ensurepip is not
available. On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.
apt-get install python3-venv
You may need to use sudo with that command. After installing the python3-venv
package, recreate your virtual environment.
Failing command: ['/u01/app/jenkins/masters/jenkins-de-bcn-team-jenkins-master-6d64469c64-d5r87/workspace/de-inhome-smoketest/venv/bin/python3.7', '-Im', 'ensurepip', '--upgrade', '--default-pip']
为了创建虚拟环境,我们使用 Makefile 如下
$(VENV_BASE):
@rm -rf venv
@$(PYTHON_VERSION) -m venv venv
@touch $@
对于冒烟测试,我们在 Makefile 中编写了以下代码
.PHONY: smoketest
smoketest: $(VENV_PROD)
venv/bin/python src/manage.py smoke_test --client_id=$(CLIENT_ID) --client_secret=$(CLIENT_SECRET) --env=$(ENV)
你能帮我在哪里安装python3-venv吗?
解决方案
推荐阅读
- arrays - 将数组拆分为列 pyspark-array 长度变量
- javascript - 使用名称捕获动态创建的 Select 的 onchange 事件
- angular - 容器旋转时角度CDK拖放错误的拖动方向
- html - 不可能的 HTML 表格
- c++ - 有没有办法让循环在等待用户输入的同时继续循环而不停止循环?
- angular - 如何迭代从可观察的响应返回的数据
- swift - Swift 中没有这样的模块 SwipeMenuViewController 错误
- cron - cloudwatch 事件计划中的多个 cron 表达式
- symfony - Symfony Doctrine Query:SELECT ALL 取决于时差
- java - 为什么 label.equals(label1) 代码看不到 label1?