简体   繁体   English

它显示“[Errno 13]权限被拒绝:'/ usr / lib / python2.7 / did-packages / Jinja2-2.8.egg-info / entry_points.txt'”当试图安装烧瓶时?

[英]It shows “ [Errno 13] Permission denied: '/usr/lib/python2.7/dist-packages/Jinja2-2.8.egg-info/entry_points.txt'” when trying to install flask?

I've tried to install on terminal and I've used two commands: 我试过在终端上安装,我使用了两个命令:

  1. pip install flask
  2. pip install -U flask

It shows the same error message on both cases: 它在两种情况下都显示相同的错误消息:

I've tried pip install -U flask but that shows the same error. 我试过pip install -U flask但是显示了同样的错误。

Here is the error I'm getting: 这是我得到的错误:

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting flask
  Using cached https://files.pythonhosted.org/packages/9a/74/670ae9737d14114753b8c8fdf2e8bd212a05d3b361ab15b44937dfd40985/Flask-1.0.3-py2.py3-none-any.whl
Collecting Jinja2>=2.10 (from flask)
  Using cached https://files.pythonhosted.org/packages/1d/e7/fd8b501e7a6dfe492a433deb7b9d833d39ca74916fa8bc63dd1a4947a671/Jinja2-2.10.1-py2.py3-none-any.whl
Collecting itsdangerous>=0.24 (from flask)
  Using cached https://files.pythonhosted.org/packages/76/ae/44b03b253d6fade317f32c24d100b3b35c2239807046a4c953c7b89fa49e/itsdangerous-1.1.0-py2.py3-none-any.whl
Collecting Werkzeug>=0.14 (from flask)
  Using cached https://files.pythonhosted.org/packages/9f/57/92a497e38161ce40606c27a86759c6b92dd34fcdb33f64171ec559257c02/Werkzeug-0.15.4-py2.py3-none-any.whl
Collecting click>=5.1 (from flask)
  Using cached https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl
Requirement already satisfied, skipping upgrade: MarkupSafe>=0.23 in /usr/lib/python2.7/dist-packages (from Jinja2>=2.10->flask) (0.23)
Installing collected packages: Jinja2, itsdangerous, Werkzeug, click, flask
  Found existing installation: Jinja2 2.8
    Uninstalling Jinja2-2.8:
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/lib/python2.7/dist-packages/Jinja2-2.8.egg-info/entry_points.txt'
Consider using the `--user` option or check the permissions.

Best way is probably to use pip install <libname> --user 最好的方法可能是使用pip install <libname> --user

Meaning in your case use pip install flask --user 在您的情况下使用pip install flask --user

This installs the package for your user and that is safe. 这将为您的用户安装包,这是安全的。 Also you have probably the right of installing the package for the user. 您也可能有权为用户安装软件包。

The permission error you have encountered is a frequent problem. 您遇到的权限错误是一个常见问题。 As can be seen here: pip is not able to install packages correctly: Permission denied error and here error: could not create '/usr/local/lib/python2.7/dist-packages/virtualenv_support': Permission denied 从这里可以看出: pip无法正确安装包:权限被拒绝错误 ,此处错误:无法创建'/usr/local/lib/python2.7/dist-packages/virtualenv_support':权限被拒绝

Using the sudo pip command is not considered as safe as explained here: What are the risks of running 'sudo pip'? 使用sudo pip命令并不像这里解释的那样安全: 运行'sudo pip'有什么风险?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 IOError:[Errno 13]权限被拒绝:&#39;/usr/local/lib/python2.7/dist-packages/finsymbols/SP500.html&#39; - IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/finsymbols/SP500.html' OSError:[Errno 2]没有这样的文件或目录:&#39;/usr/local/lib/python2.7/dist-packages/pyduino-0.0.0-py2.7.egg&#39; - OSError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/pyduino-0.0.0-py2.7.egg' 错误:无法创建'/usr/local/lib/python2.7/dist-packages/virtualenv_support':权限被拒绝 - error: could not create '/usr/local/lib/python2.7/dist-packages/virtualenv_support': Permission denied PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.8/dist-packages/grpc/__init__.py' - PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.8/dist-packages/grpc/__init__.py' 安装djangorestframework时出现错误-权限被拒绝:&#39;/ usr / lib / python2.7 / site-packages / djangorestframework-3.6.3.dist-info&#39; - Getting Error while installing djangorestframework - Permission denied: '/usr/lib/python2.7/site-packages/djangorestframework-3.6.3.dist-info' virtualenv中的python3仍使用/usr/lib/python2.7/dist-packages中的库 - python3 in a virtualenv still uses library in /usr/lib/python2.7/dist-packages 如何从/usr/lib/python2.7/dist-packages/中的dir获取源软件包 - How to get source packages from dir in /usr/lib/python2.7/dist-packages/ 如何在appengine app中使用/usr/local/lib/python2.7/dist-packages中的模块 - How to use module from /usr/local/lib/python2.7/dist-packages in appengine app pip将2.7个软件包安装到/usr/local/lib/python3.2/dist-packages中 - pip installs 2.7 packages into /usr/local/lib/python3.2/dist-packages “PermissionError: [Errno 13] Permission denied: &#39;/usr/lib/python3.5/site-packages&#39;” 安装 Django - “PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.5/site-packages'” installing Django
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM