python virtualenv:如何指定基本前缀?

时间:2017-09-11 02:12:56

标签: python virtualenv

我创建新的VM实例(Google云平台计算引擎)后,firstly I installed python 3.6.2 in /usr/local/bin

我设置了默认的python解释器/usr/local/bin/python3.6。

$ python -V
Python 3.6.2

$ virtualenv --version
15.1.0

我的问题是激活脚本未创建。

$ virtualenv myenv

Using base prefix '/usr'  
...  
...  
Traceback (most recent call last):
  File "/usr/local/bin/virtualenv", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.4/dist-packages/virtualenv.py", line 713, in main
    symlink=options.symlink)
  File "/usr/local/lib/python3.4/dist-packages/virtualenv.py", line 945, in create_environment
    download=download,
  File "/usr/local/lib/python3.4/dist-packages/virtualenv.py", line 901, in install_wheel
    call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
  File "/usr/local/lib/python3.4/dist-packages/virtualenv.py", line 797, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /home/juhyun1849/PyVirt/test/bin/python3 - setuptools pip wheel failed with error code 1

我想将 bsse前缀&#39; / usr&#39; 更改为 / usr / local

我该怎么做?

0 个答案:

没有答案