错误:无法创建"/usr/local/lib/python2.7/dist-packages/virtualenv_support":权限被拒绝 [英] error: could not create '/usr/local/lib/python2.7/dist-packages/virtualenv_support': Permission denied
本文介绍了错误:无法创建"/usr/local/lib/python2.7/dist-packages/virtualenv_support":权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用ubuntu 12.04,并且尝试通过pip安装virtualenv,但突然我收到了此错误.
I am using ubuntu 12.04 and I am trying to pip install virtualenv but suddenly I got this error.
samuel@sampc:~$ pip install virtualenv
Downloading/unpacking virtualenv
Running setup.py egg_info for package virtualenv
warning: no previously-included files matching '*' found under directory 'docs/_templates'
warning: no previously-included files matching '*' found under directory 'docs/_build'
Installing collected packages: virtualenv
Running setup.py install for virtualenv
error: could not create '/usr/local/lib/python2.7/dist-packages/virtualenv_support': Permission denied
Complete output from command /usr/bin/python -c "import setuptools;__file__='/home/samuel/build/virtualenv/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-Z2v_fR-record/install-record.txt:
running install
running build
running build_py
running install_lib
creating /usr/local/lib/python2.7/dist-packages/virtualenv_support
error: could not create '/usr/local/lib/python2.7/dist-packages/virtualenv_support': Permission denied
----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/home/samuel/build/virtualenv/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-Z2v_fR-record/install-record.txt failed with error code 1
Storing complete log in /home/samuel/.pip/pip.log
有人对我的案子有想法吗?
Does anyone have an idea about my case?
推荐答案
我听说将sudo
与pip
一起使用是不安全的.
I've heard that using sudo
with pip
is unsafe.
尝试在命令末尾添加--user
,如此处所述.
Try adding --user
to the end of your command, as mentioned here.
pip install packageName --user
我怀疑使用此方法进行安装意味着其他用户无法使用这些软件包.
I suspect that installing with this method means the packages are not available to other users.
这篇关于错误:无法创建"/usr/local/lib/python2.7/dist-packages/virtualenv_support":权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文