python3 对应的pip安装(RHEL6)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_36637034/article/details/53066159

1.下载get-pip.py

https://bootstrap.pypa.io/get-pip.py

 

2.执行get-pip.py时出错

[root@localhost SoftInstaller]# python3 get-pip.py
Traceback (most recent call last):
  File "get-pip.py", line 20061, in <module>
    main()
  File "get-pip.py", line 194, in main
    bootstrap(tmpdir=tmpdir)
  File "get-pip.py", line 82, in bootstrap
    import pip
zipimport.ZipImportError: can't decompress data; zlib not available

3.安装zlib包
wget http://jaist.dl.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.gz
tar xzvf zlib-1.2.8.tar.gz
./configure
make
make install

 

4.重新编译python

修改Setup.dist后重新make(去掉zlib的注释)

报错:

Ignoring ensurepip failure: pip 8.1.1 requires SSL/TLS

 

5.安装ssl库

yum install openssl-devel

 

参考:

https://www.zhihu.com/question/30279880

阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页