admin管理员组文章数量:1026406
没权限的安装模块方法
当你不是root用户时,安装模块时报错:
$ pip install Cmake
…
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: ‘/usr/lib64/python2.7/site-packages/cmake-3.14.4.dist-info’
Consider using the--user
option or check the permissions.
因为代表进行全局安装,安装后全局可用
解决办法就是:
$ pip install --user Cmake
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 Cmake
Using cached https://files.pythonhosted/packages/09/bb/0121c0ae40144b99420a1a0ea081d48ac4d77332600896d7e04bf23aa957/cmake-3.14.4-py2-none-manylinux2010_x86_64.whl
Installing collected packages: Cmake
Successfully installed Cmake-3.14.4
添加一个–user,代表仅该用户的安装,安装后仅该用户可用。处于安全考虑,尽量使用该命令进行安装。
记得卸载的时候也要添加 --user
没权限的安装模块方法
当你不是root用户时,安装模块时报错:
$ pip install Cmake
…
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: ‘/usr/lib64/python2.7/site-packages/cmake-3.14.4.dist-info’
Consider using the--user
option or check the permissions.
因为代表进行全局安装,安装后全局可用
解决办法就是:
$ pip install --user Cmake
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 Cmake
Using cached https://files.pythonhosted/packages/09/bb/0121c0ae40144b99420a1a0ea081d48ac4d77332600896d7e04bf23aa957/cmake-3.14.4-py2-none-manylinux2010_x86_64.whl
Installing collected packages: Cmake
Successfully installed Cmake-3.14.4
添加一个–user,代表仅该用户的安装,安装后仅该用户可用。处于安全考虑,尽量使用该命令进行安装。
记得卸载的时候也要添加 --user
本文标签: 权限Userpippermissionscheck
版权声明:本文标题:pip安装时无权限 Consider using the `--user` option or check the permissions. 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/jiaocheng/1738336425a1562775.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论