相关疑难解决方法(0)

运行'sudo pip'有什么风险?

偶尔我碰上评论或回应表示国家重点跑跑pipsudo是"错误"或"坏",但也有例(其中我有一堆的设置工具的方式),其中它要么是简单得多,或者甚至是必要的以这种方式运行.

什么是与运行相关的风险pipsudo


请注意,这与问题的问题不同,尽管标题不提供有关风险的信息.这也不是关于如何避免使用的问题sudo,而是关于人们想要的具体原因.

python security sudo pip

89
推荐指数
3
解决办法
4万
查看次数

pip无法正确安装包:权限被拒绝错误

我正在尝试安装lxml以在我的Mac上安装scrapy(v 10.9.4)

??ishaantaylor@Ishaans-MacBook-Pro.local ~
???  pip install lxml
Downloading/unpacking lxml
  Downloading lxml-3.4.0.tar.gz (3.5MB): 3.5MB downloaded
  Running setup.py (path:/private/var/folders/8l/t7tcq67d34v7qq_4hp3s1dm80000gn/T/pip_build_ishaantaylor/lxml/setup.py) egg_info for package lxml
    /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
      warnings.warn(msg)
    Building lxml version 3.4.0.
    Building without Cython.
    Using build configuration of libxslt 1.1.28

    warning: no previously-included files found matching '*.py'
Installing collected packages: lxml
  Running setup.py install for lxml
    /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
      warnings.warn(msg)
    Building lxml version 3.4.0.
    Building without Cython.
    Using build configuration of libxslt 1.1.28
    building 'lxml.etree' …
Run Code Online (Sandbox Code Playgroud)

python macos lxml pip scrapy

83
推荐指数
2
解决办法
21万
查看次数

错误:无法创建'/usr/local/lib/python2.7/dist-packages/virtualenv_support':权限被拒绝

我正在使用ubuntu 12.04而我正在尝试使用安装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': …
Run Code Online (Sandbox Code Playgroud)

python pip virtualenv ubuntu-12.04

51
推荐指数
4
解决办法
10万
查看次数

Conda 软件包安装 [Errno 13] 安装 conda-forge::protobuf-3.8.0 时权限被拒绝

我有一个带有 Python 3.6 的 conda 环境,但我的 Pytorch 安装出了问题,所以我尝试再次安装它。在安装即将结束时,我收到此错误:

ERROR conda.core.link:_execute(700): An error occurred while installing package 'conda-forge::protobuf-3.8.0-py36h6de7cb9_1'.
Rolling back transaction: done

[Errno 13] Permission denied: '/Users/myusername/anaconda3/envs/torch/lib/python3.6/site-packages/google/protobuf/__init__.py'
()
Run Code Online (Sandbox Code Playgroud)

此外,它还说“环境不一致”,这可能表明某些地方已经出了问题。

完整详细信息:

$ conda install pytorch torchvision -c pytorch
Collecting package metadata (current_repodata.json): done
Solving environment: - 
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:

  - conda-forge/osx-64::tensorboard==1.14.0=py36_0
  - conda-forge/noarch::tensorboardx==1.9=py_0
done

## Package Plan ##

  environment location: /Users/myusername/anaconda3/envs/torch

  added / updated specs:
    - pytorch
    - …
Run Code Online (Sandbox Code Playgroud)

python permissions installation conda pytorch

5
推荐指数
2
解决办法
2万
查看次数