且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

pip:找不到激活的virtualenv(必填)

更新时间:2023-10-27 16:45:34

打开您的~/.bashrc文件,查看是否存在该行-

Open your ~/.bashrc file and see if this line is there -

export PIP_REQUIRE_VIRTUALENV=true

这可能是造成麻烦的原因.如果存在,将其更改为false并运行-

It might be causing the trouble. If it's there, change it to false and run -

source ~/.bashrc

如果没有,请从终端运行export PIP_REQUIRE_VIRTUALENV=false.

If not, run export PIP_REQUIRE_VIRTUALENV=false from terminal.

注意:如果当前用户的根目录中使用的是.bash_profile而不是.bashrc,则所有操作均相同.

Note: everything works the same if you have .bash_profile instead of .bashrc in your current user's root directory.