在Mac,flake8上进行软件安装时出错

时间:2019-01-31 01:05:28

标签: python python-2.7

我是Python的新手,并尝试使用以下命令在Mac上安装flake8:

python2.7 -m pip install flake8

但是我收到以下错误:

Collecting flake8
  Using cached https://files.pythonhosted.org/packages/69/3b/59284a25e5f087347125d35596c6775c574b8933722f71e0cdfff92cecab/flake8-3.7.2-py2.py3-none-any.whl
Collecting configparser; python_version < "3.2" (from flake8)
  Using cached https://files.pythonhosted.org/packages/e9/b1/98e5e3094aac1c0efaeb208fb45f9b42eb1d5681b4c5dac77b05d0fec71a/configparser-3.7.1-py2-none-any.whl
Collecting mccabe<0.7.0,>=0.6.0 (from flake8)
  Using cached https://files.pythonhosted.org/packages/87/89/479dc97e18549e21354893e4ee4ef36db1d237534982482c3681ee6e7b57/mccabe-0.6.1-py2.py3-none-any.whl
Collecting entrypoints<0.4.0,>=0.3.0 (from flake8)
  Using cached https://files.pythonhosted.org/packages/ac/c6/44694103f8c221443ee6b0041f69e2740d89a25641e62fb4f2ee568f2f9c/entrypoints-0.3-py2.py3-none-any.whl
Collecting pyflakes<2.2.0,>=2.1.0 (from flake8)
  Using cached https://files.pythonhosted.org/packages/16/3b/b6a508ad148ce1ef50bd7a9a783afbb8d775616fc4ae5e3007c8815a3c85/pyflakes-2.1.0-py2.py3-none-any.whl
Collecting typing; python_version < "3.5" (from flake8)
  Using cached https://files.pythonhosted.org/packages/cc/3e/29f92b7aeda5b078c86d14f550bf85cff809042e3429ace7af6193c3bc9f/typing-3.6.6-py2-none-any.whl
Requirement already satisfied: enum34; python_version < "3.4" in ./Library/Python/2.7/lib/python/site-packages (from flake8) (1.1.6)
Collecting pycodestyle<2.6.0,>=2.5.0 (from flake8)
  Using cached https://files.pythonhosted.org/packages/0e/0c/04a353e104d2f324f8ee5f4b32012618c1c86dd79e52a433b64fceed511b/pycodestyle-2.5.0-py2.py3-none-any.whl
Installing collected packages: configparser, mccabe, entrypoints, pyflakes, typing, pycodestyle, flake8
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/configparser.pyc'
Consider using the `--user` option or check the permissions.

我尝试并检查了权限,我拥有Mac,应该没有权限问题,并尝试升级pip,但这也无济于事。

0 个答案:

没有答案