我有CentOS 6的下面的Python:在cenOS安裝使用python 2.7 PIP 6
默認:
[[email protected] vagrant]# python
Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
定製:
[[email protected] vagrant]# python2.7
Python 2.7.13 (default, Jul 7 2017, 12:01:53)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
當我嘗試使用安裝PIP Python2.7然後得到以下錯誤:
[[email protected] vagrant]# python2.7 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
如果安裝是通過yum完成的(我想使用默認的python),那麼pip安裝成功,但是我在通過pip安裝任何模塊時遇到了問題:InsecurePlatformWarning 並建議python升級。 如何解決這個問題,並且遇到類似問題?
是否通過yum升級python作品? – dlmeetei
它得到了解決......下面的幫助... https://stackoverflow.com/questions/12344970/building-python-from-source-with-zlib-support謝謝你們所有... – Rohit