1

这里有什么问题?

user@linux> virtualenv foobar
....
error: could not create '/lib/python2.7': Permission denied
----------------------------------------
...Installing Setuptools...done.
Traceback (most recent call last):
  File "/usr/bin/virtualenv", line 9, in <module>
    load_entry_point('virtualenv==1.10.1', 'console_scripts', 'virtualenv')()
  File "/usr/lib/python2.7/site-packages/virtualenv.py", line 821, in main
    symlink=options.symlink)
  File "/usr/lib/python2.7/site-packages/virtualenv.py", line 961, in create_environment
    install_sdist('Setuptools', 'setuptools-*.tar.gz', py_executable, search_dirs)
  File "/usr/lib/python2.7/site-packages/virtualenv.py", line 932, in install_sdist
    filter_stdout=filter_install_output)
  File "/usr/lib/python2.7/site-packages/virtualenv.py", line 899, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /home/modwork_guf_dfj/foobar/bin/python setup.py install --single-version-externally-managed --record record failed with error code 1

virtualenv --version 1.10.1

4

1 回答 1

8

回答我自己的问题。在 ~/.pydistutils.cfg 中设置了一个空前缀。评论这个前缀后,创建 virtualenv 工作。

#http://stackoverflow.com/questions/4495120/combine-user-with-prefix-error-with-setup-py-install

#[install]
#prefix=
于 2013-09-24T10:59:36.480 回答