虚拟环境激活后,pip无法安装程序

目录名中不能包含空格.

很绝望,找了一个上午.

Create your virtualenv environment within a path without spaces.

When you create an environment, it sets up a bin directory. In that bin directory are all the executables relating to the environment. Some are scripts. As you may know, hashbangs are used to tell the system what interpreter to use to run the script. You may see this at the top of scripts often:

#!/usr/bin/env python

If the script is at /tmp/test.py, that tells the system to run this command to execute the script:

/usr/bin/env python /tmp/test.py

In your case, virtualenv is creating scripts like this:

#!/tmp/oh no/bin/python

When the system tries to execute that, it will try to execute the command /tmp/oh with the arguments no/bin/python and /tmp/test.py/tmp/oh does not exist, so it fails.

 

 

posted @ 2017-03-28 10:35  Cheko  阅读(1181)  评论(0编辑  收藏  举报