当前位置:网站首页>如何更新pip3?和Running pip as the ‘root‘ user can result in broken permissions and conflicting behaviour
如何更新pip3?和Running pip as the ‘root‘ user can result in broken permissions and conflicting behaviour
2022-07-27 07:43:00 【奇点_97】
哈喽!大家好,我是「奇点」,江湖人称 singularity。刚工作几年,想和大家一同进步
一位上进心十足的【Java ToB端大厂领域博主】!
喜欢java和python,平时比较懒,能用程序解决的坚决不手动解决
如果有对【java】感兴趣的【小可爱】,欢迎关注我️️️感谢各位大可爱小可爱!️️️
————————————————
今天在使用python的时候,下载pyMysql出现了一个警告,
WARNING: You are using pip version 21.2.4; however, version 22.2 is available.
You should consider upgrading via the '/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 -m pip install --upgrade pip' command.

大致意思是我的pip版本有些老了,让我进行升级操作。

好了使用下面的方法升级
sudo -H pip3 install --upgrade pip
但是由出现提示了???
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
大致意思是权限太高了是要sudo进行安装。代表进行全局安装,安装后全局可用。如果是信任的安装包可用使用该命令进行安装。这个简而言之就是获取了管理员权限,把第三方包安装在/usr/local/lib/python3.x/site-packages/路径下,可供任何用户使用。
所以在安装时使用 pip3 install --upgrade pip
pip3 install --user packagename
而对于网上的很多教程说用pip3安装第三包的指令是:pip3 install 包名。但这样执行的时候会报错,报错信息一般为权限不够
其实很多时候有时我们使用服务器,很多时候并没有root权限,也无法用sudo,所以安装的时候都要加上 --user参数,安装的东西就在/home目录下,而不是在/user目录下。
如果觉得本文对你有帮助,欢迎点赞,欢迎关注我,如果有补充欢迎评论交流,我将努力创作更多更好的文章。
边栏推荐
- 反弹shell是什么?反弹shell有什么用?
- Framework of electronic mass production project -- basic idea
- The token verification of applet message push configuration failed. Please check and confirm
- Gossip: it's really important to have a rod in your hand and a net on your shoulder. As for how many fish are in the basket?
- 容器内使用sudo报错bash: sudo: command not found解决
- Installation and use of apifox
- Closed hash and open hash resolve hash conflicts
- Primary key in MySQL secondary index - MySQL has a large number of same data paging query optimization
- MySQL table name area in Linux is not case sensitive
- 增强:BTE流程简介
猜你喜欢

Am I delayed by the code... Unfortunately, I became a programmer
为啥国内大厂都把云计算当成香饽饽,这个万亿市场你真的了解吗

如何在电脑端登陆多个微信

Prior Attention Enhanced Convolutional Neural Network Based Automatic Segmentation of Organs at Risk

API 版本控制【 Eolink 翻译】

Understanding and learning of node flow and processing flow in io

Use Amazon dynamodb and Amazon S3 combined with gzip compression to maximize the storage of player data

Comprehensive analysis of ADC noise-02-adc noise measurement method and related parameters

DASCTF2022.07赋能赛密码wp

安装tensorflow
随机推荐
Shell functions and arrays exercises
【QT】capture. Obj:-1: error: lnk2019: unresolved external symbols__ imp_ Htons (solution)
电子量产项目框架--基本思想
C语言:优化后的希尔排序
Solution to automatic disconnection of SSH link of Tencent ECS
【Day42 文献精读】A Bayesian Model of Perceived Head-Centered Velocity during Smooth Pursuit Eye Movement
Regular and sed exercises
3D激光SLAM:LeGO-LOAM论文解读---摘要
实用的新药研发项目管理平台
npm的使用
【StoneDB Class】入门第一课:数据库知识科普
Summary of several common ways to join dimension tables in Flink
Primary key in MySQL secondary index - MySQL has a large number of same data paging query optimization
Understanding and learning of node flow and processing flow in io
opengl-shader学习笔记:varying变量
JS存取cookie示例
反弹shell是什么?反弹shell有什么用?
[stonedb class] introductory lesson 1: popular science of database knowledge
一体化实时HTAP数据库StoneDB,如何替换MySQL并实现近百倍分析性能的提升
Shell loop exercise