gpt4 book ai didi

python - 错误 : could not create '/usr/local/lib/python2.7/dist-packages/virtualenv_support' : Permission denied

转载 作者:IT老高 更新时间:2023-10-28 20:28:48 25 4
gpt4 key购买 nike

我正在使用 ubuntu 12.04,我正在尝试 pip install virtualenv 但突然出现此错误。

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

有人知道我的案子吗?

最佳答案

我听说将 sudopip 一起使用是不安全的。

尝试将 --user 添加到命令末尾,如 here 所述.

pip install packageName --user

我怀疑使用这种方法安装意味着其他用户无法使用这些包。

关于python - 错误 : could not create '/usr/local/lib/python2.7/dist-packages/virtualenv_support' : Permission denied,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21093002/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com