当前位置:网站首页>How to update PIP3? And running PIP as the 'root' user can result in broken permissions and conflicting behavior
How to update PIP3? And running PIP as the 'root' user can result in broken permissions and conflicting behavior
2022-07-27 07:54:00 【Singularity_ ninety-seven】
hello ! Hello everyone , I am a 「 singularity 」, Jianghu people singularity. Just worked for a few years , I want to make progress with you
A highly motivated 【Java ToB Blogger in the field of duandachang 】!
like java and python, Usually lazy , Those that can be solved by program must not be solved manually
If there is a pair of 【java】 Interested in 【 Cutie 】, Welcome to follow me️️️ Thank you, big and small !️️️
————————————————
In use today python When , download pyMysql A warning appears ,
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.

It roughly means my pip The version is a little old , Let me upgrade .

OK, use the following method to upgrade
sudo -H pip3 install --upgrade pip
But the prompt appeared ???
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
The general meaning is that the authority is too high to sudo Installation . Global installation on behalf of , Available globally after installation . If it is a trusted installation package, you can use this command to install . In short, you have obtained administrator permission , Install the third-party package on /usr/local/lib/python3.x/site-packages/ Under the path , It can be used by any user .
So when installing pip3 install --upgrade pip
pip3 install --user packagename
And for many online tutorials pip3 The instructions for installing the third package are :pip3 install Package name . But an error will be reported when implementing this , The error information is generally insufficient authority
In fact, sometimes we use servers , Many times there is no root jurisdiction , It doesn't work sudo, Therefore, it is necessary to add --user Parameters , The things installed are /home Under the table of contents , Not in /user Under the table of contents .
If you find this helpful , Welcome to thumb up , Welcome to follow me , If there is any supplement, please comment and exchange , I will try to create more and better articles .
边栏推荐
猜你喜欢

杂谈:把肉都烂在锅里就是保障学生权益了?

What about idea Chinese garbled code

Day111.尚医通:集成NUXT框架、前台页面首页数据、医院详情页

如何更新pip3?和Running pip as the ‘root‘ user can result in broken permissions and conflicting behaviour

Gossip: is rotting meat in the pot to protect students' rights and interests?

物来顺应,未来不迎,当时不杂,既过不恋

【已解决】新版Pycharm(2022)连接服务器进行上传文件报错“Command rsync is not found in PATH”,无法同步文件

Promise详解

北京五日游记

如何在电脑端登陆多个微信
随机推荐
Apifox安装及使用
Debug:与泛型有关的“无法解析的外部符号”
Redisson 3.17.5 发布,官方推荐的 Redis 客户端
Practical new drug R & D project management platform
擎创科技加入龙蜥社区,共建智能运维平台新生态
Bash: sudo: command not found in container
CommonTitleBar hide left right
How to get DDL information of an object
C language programming | program compilation and preprocessing
反弹shell是什么?反弹shell有什么用?
shell脚本学习day01
Synchronized lock
【pytorch】ResNet18、ResNet20、ResNet34、ResNet50网络结构与实现
如何在 60 秒内去分析和定位问题?
2020国际机器翻译大赛:火山翻译力夺五项冠军
Shell Scripts相关
What other methods are available for MySQL index analysis besides explain
浅谈数据安全
C language: optimized Hill sort
【小程序】uniapp发行微信小程序上传失败Error: Error: {'errCode':-10008,'errMsg':'invalid ip...