【Centos】深度解析:CentOS下安装pip的完整指南
大家好 我是寸铁👊
总结了一篇【Centos】深度解析:CentOS下安装pip的完整指南✨
喜欢的小伙伴可以点点关注 💝
方式1(推荐)
- 下载
get-pip.py
到本地
shell
sudo wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
需要拿个版本就
get
哪个版本!

- 安装
pip
,运行get-pip.py

- 验证
pip
是否安装成功
如下图则说明安装成功:

-
尝试安装一下
numpy
包,如下说明没什么问题了
-
再安装一下
torch
包 OK

整个过程还是十分丝滑的~
方式2(避坑!!!)
笔者在使用
yum
安装时遇到各种问题,不推荐大家用这种方式安装,需要避坑!!!
- 将 EPEL 存储库添加到 CentOS 系统的仓库列表
使系统能够从 EPEL 存储库中获取软件包。
shell
sudo yum install epel-release
如下图所示:

- 安装
pip3
shell
yum -y install python3-pip
pip2
则输入如下命令:
shell
yum -y install python-pip
如下图所示:

- 验证是否安装成功
shell
pip3
如下图则说明安装成功:

看到这里的小伙伴,恭喜你又掌握了一个技能👊
希望大家能取得胜利,坚持就是胜利💪
我是寸铁!我们下期再见💕
往期好文💕
保姆级教程
【保姆级教程】Windows11下go-zero的etcd安装与初步使用
【保姆级教程】Windows11安装go-zero代码生成工具goctl、protoc、go-zero
【Go-Zero】手把手带你在goland中创建api文件并设置高亮
报错解决
【Go-Zero】Error: user.api 27:9 syntax error: expected ':' | 'IDENT' | 'INT', got '(' 报错解决方案及api路由注意事项
【Go-Zero】Error: only one service expected goctl一键转换生成rpc服务错误解决方案
【Go-Zero】【error】 failed to initialize database, got error Error 1045 (28000):报错解决方案
【Go-Zero】Error 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)报错解决方案
【Go-Zero】type mismatch for field "Auth.AccessSecret", expect "string", actual "number"报错解决方案
【Go-Zero】Error: user.api 30:2 syntax error: expected ')' | 'KEY', got 'IDENT'报错解决方案
【Go-Zero】Windows启动rpc服务报错panic:context deadline exceeded解决方案