【发布时间】:2020-09-30 12:24:03
【问题描述】:
我正在尝试安装 python3 virtualenv。我尝试运行 virtualenv 时收到以下消息。
virtualenv
Command 'virtualenv' not found, but can be installed with:
apt install python3-virtualenv
但如果我运行 install 命令,我会收到以下错误。
apt install python3-virtualenv
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python3-virtualenv
对于python3 -m venv,我收到使用apt-get install python3-venv 安装的消息
但是当我尝试时,我得到了同样的信息。
sudo apt-get install python3-venv
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python3-venv is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'python3-venv' has no installation candidate
我以 root 身份运行它。 wget 也可以。
【问题讨论】:
-
python3 -m venv工作吗? -
你用的是什么版本的python?
-
操作系统自带 Python 3.8.2
-
用 python3 -m venv 得到的错误消息更新了主线程
标签: python google-cloud-platform virtualenv ubuntu-20.04