更新时间:2023-01-14 22:23:08
检查which pip
的输出,最有可能的 pip 没有安装.如果它不是来自 venv 的 pip 还要检查 which python
.如果不是 venv 的 python,则说明您不在新环境中 - 应该有一些错误.
Check the output of which pip
, most likly pip is not installed. If it is not pip from venv also check which python
. If it is not venv's python, your are not in the new env - there should be some errors.
如果只缺少 pip 尝试安装:
If only pip is missing try to install with:
curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | python
编辑
Virualenv 仅适用于当前的 shell 会话.要在另一个会话/终端/窗口中使用,您必须再次激活它.它会一直存在,直到您停用
它.
Virualenv is only for current shell session. To use in another session/terminal/window you must activate it again. It persists until you deactivate
it.