使用Python3.6的CentOS7上的虚拟环境设置失败

时间:2020-01-28 19:40:01

标签: python-3.6 centos7 python-venv

遵循以下指示:

https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-local-programming-environment-on-centos-7

以下命令:

  $ python3.6 -m venv my_env

会给出错误:

Error: Command '['/home/username/mudlan-master/environments/my_env/bin/python3.6', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

我该如何解决?

1 个答案:

答案 0 :(得分:0)

我在软件包管理器外部本地安装了pip3。我从/ usr / local / bin / pip3 *中删除了它,然后重新安装:

  $ sudo yum remove python36u-pip
  $ sudo yum install python36u-pip