首页 > 编程知识 正文

centos7安装拼音输入法,centos7安装ping命令

时间:2023-05-06 03:59:32 阅读:248862 作者:126

1、通过yum -y install python-pip命令进行安装提示没有可用软件包 python-pip,如下图所示:

已加载插件:fastestmirror, langpacks
Determining fastest mirrors
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
base                                                                                                                                                                                                                      | 3.6 kB  00:00:00     
bintray--sbt-rpm                                                                                                                                                                                                          | 1.3 kB  00:00:00     
extras                                                                                                                                                                                                                    | 2.9 kB  00:00:00     
updates                                                                                                                                                                                                                   | 2.9 kB  00:00:00     
(1/2): updates/7/x86_64/primary_db                                                                                                                                                                                        | 1.9 MB  00:00:00     
bintray--sbt-rpm/primary       FAILED                                          
https://sbt.bintray.com/rpm/repodata/92fda36802b79cc2ba1b093f9815757d5da4d35c-primary.xml.gz: [Errno 12] Timeout on https://sbt.bintray.com/rpm/repodata/92fda36802b79cc2ba1b093f9815757d5da4d35c-primary.xml.gz: (28, 'Operation timed out after 30000 milliseconds with 0 out of 0 bytes received')
正在尝试其它镜像。
(2/2): bintray--sbt-rpm/primary                                                                                                                                                                                           | 4.5 kB  00:00:01     
bintray--sbt-rpm                                                                                                                                                                                                                           41/41
没有可用软件包 python-pip。
错误:无须任何处理
2、接着执行:yum -y install epel-release python-pip命令,如下图所示:

3、最后在次执行:yum -y install python-pip即可成功,如下图所示:

4、然后可通过pip -V查看版本,如下图所示:

5、然后通过:pip install --upgrade pip --user进行升级,如下图所示:

6、然后在执行:pip install --upgrade pip,如下图所示:

7、此时在看版本即可升级成功,如下图所示:

8、然后就可以通过

python3 -m pip install XXX或python2 -m pip install XXX安装对应的版本了。

注意:使用此命令可以安装对应不同的python版本

9、当出现Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443)时,如下图所示:

此问题是url的来源的问题,换成了国内的pip源即可

10、选择阿里云的url,执行:python -m pip install chardet -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com即可

如下图所示:

11、设置默认源,首先在~/创建一个.pip文件夹,如下图所示:

12、然后在.pip文件夹中新建一个pip.conf文件,文件内容如下:

[global]index-url=http://mirrors.aliyun.com/pypi/simple/trusted-host = mirrors.aliyun.com

如下图所示:

13、保存退出,然后执行python -m pip install matplotlib即可,如下图所示:

此时发现已经是从阿里云地址下载了。

14、如果安装的包需要指定版本,可以通过python2 -m pip install numpy==1.16.5指定版本安装,如下图所示:

相关的url源有:

1)http://mirrors.aliyun.com/pypi/simple/ 阿里云

2)https://pypi.mirrors.ustc.edu.cn/simple/  中国科技大学

3) http://pypi.douban.com/simple/  豆瓣

4) https://pypi.tuna.tsinghua.edu.cn/simple/ 清华大学

5)  http://pypi.mirrors.ustc.edu.cn/simple/ 中国科学技术大学

什么是超融合?

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。