pip:找不到激活的virtualenv(必填) [英] pip: Could not find an activated virtualenv (required)
问题描述
我正在尝试在mac osx 10.8.3上安装virtualenv和/或virtualenvwrapper
I am trying to instal virtualenv and/or virtualenvwrapper on a mac osx 10.8.3
最近两天我一直在和python战斗.最终,我能够使用brew安装python 2.7.4.在我使用easy_install安装virtualenv之前.然后,我尝试将其卸载,以使我的计算机处于与我的一位同事相同的状态.也许我成功卸载了它,也许没有成功.我不知道如何测试.现在我应该使用-
I have been fighting with python for the last two days. Finally I was able to install python 2.7.4 using brew. Before I had virtualenv installed using easy_install. Then I tried to uninstall it, trying to get my computer in the same situation as the one of my colleagues. Maybe I uninstalled it with success, maybe not. I don't know how to test it. Now I am supposed to install virtualenv using -
pip install virtualenv
但这给了我-
Could not find an activated virtualenv (required).
pip install virtualenvwrapper
给出完全相同的输出.
pip install virtualenvwrapper
gives exactly the same output.
另外变量:PIP_RESPECT_VIRTUALENV
为空:
echo $PIP_RESPECT_VIRTUALENV
我该如何解决这个问题?
How can I solve this issue?
谢谢
推荐答案
打开您的~/.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.
这篇关于pip:找不到激活的virtualenv(必填)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!