当前位置:网站首页>如何更新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目录下。
如果觉得本文对你有帮助,欢迎点赞,欢迎关注我,如果有补充欢迎评论交流,我将努力创作更多更好的文章。
边栏推荐
- What are the main threads of Youxuan database?
- 【pytorch】ResNet18、ResNet20、ResNet34、ResNet50网络结构与实现
- Gossip: is rotting meat in the pot to protect students' rights and interests?
- Bingbing's learning notes: classes and objects (middle)
- Chromedriver download - self use
- STM32_ Find the cause of entering hardfault_ Handler's function
- DEMO:PA30 银行国家码默认CN 增强
- 综合案例、
- Demo:pa30 Bank Country Code default CN enhancement
- Hu related configuration
猜你喜欢

C#winform 窗体事件和委托结合用法
![[resolved] the new version of pychart (2022) connects to the server to upload files and reports an error of](/img/13/573d8ae55eb25580a5628b469dfab3.png)
[resolved] the new version of pychart (2022) connects to the server to upload files and reports an error of "command Rsync is not found in path", and the files cannot be synchronized

JS regular expression implementation adds a comma to every three digits
![[day42 literature intensive reading] a Bayesian model of perfect head centered velocity during smooth pursuit eye movement](/img/28/979dceac1454a3e53409a4feb20320.png)
[day42 literature intensive reading] a Bayesian model of perfect head centered velocity during smooth pursuit eye movement

Clickhouse notes 1 | introduction, features | installation and use based on centos7 system | common data types | mergetree table engine | SQL operation

Plato farm is expected to further expand its ecosystem through elephant swap

单片机多级菜单

Am I delayed by the code... Unfortunately, I became a programmer

Lua迭代器
![[stonedb class] introductory lesson 1: popular science of database knowledge](/img/ec/4e3c0b91ac2ee164595c2891b23dfb.jpg)
[stonedb class] introductory lesson 1: popular science of database knowledge
随机推荐
【QT】capture. Obj:-1: error: lnk2019: unresolved external symbols__ imp_ Htons (solution)
杂谈:手里有竿儿,肩上有网,至于背篓里有多少鱼真的重要吗?
Okaleido ecological core equity Oka, all in fusion mining mode
Lua有状态迭代器
小程序支付管理-新版支付对接流程
Shell awk related exercises
[golang learning notes 2.0] arrays and slices in golang
Am I delayed by the code... Unfortunately, I became a programmer
Jjwt generate token
Lu Xun: I don't remember saying it, or you can check it yourself!
STM32_ Find the cause of entering hardfault_ Handler's function
杂谈:把肉都烂在锅里就是保障学生权益了?
ADC噪声全面分析 -02- ADC 噪声测量方法和相关参数
User unlock sm04 sm12
Codeforces Round #810 (Div.2) A-C
C# 中的转译字符'/b'
C language: random number + Hill sort
Shell Scripts相关
DASCTF2022.07赋能赛密码wp
面试复盘五