首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >python无法安装pycodestyle

python无法安装pycodestyle
EN

Stack Overflow用户
提问于 2017-08-16 11:35:10
回答 1查看 574关注 0票数 0

我正在尝试使用pip install来安装autopep8。当我试图安装pycodestyle时,我的权限被拒绝了

代码语言:javascript
复制
Collecting autopep8
  Using cached autopep8-1.3.2-py2.py3-none-any.whl
Collecting pycodestyle>=2.3 (from autopep8)
  Using cached pycodestyle-2.3.1-py2.py3-none-any.whl
Installing collected packages: pycodestyle, autopep8
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 323, in clobber
    shutil.copyfile(srcfile, destfile)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pycodestyle.py'

EN

回答 1

Stack Overflow用户

发布于 2017-08-16 11:37:41

您对python没有问题,但您的用户对linux框的权限有问题。尝试使用sudo pip install package,而不仅仅是pip install package

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45704714

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档