Centos 7 安裝Python3.6.4 報錯解決方法zipimport.ZipImportError: can't decompress data; zlib not available   make: *** [install] Error 1


  在centos7 中安裝Python3中遇到的問題

  wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz

  tar -xvf Python-3.6.4.tgz

  cd Python-3.6.4

  ./configure

  報錯:

  configure: error: no acceptable C compiler found in $PATH

 

  See `config.log' for more details

  解決辦法:安裝GCC

  yum install gcc

  完成后再次安裝

  1. ./configure  
  2. make  
  3. make altinstall  

  在make install 命令后出現錯誤:

  zipimport.ZipImportError: can't decompress data; zlib not available

  make: *** [install] Error 1

  解決方法:

  yum install -y zlib*

  1. cd Modules/zlib  
  2. ./configure  
  3. make install  
  4. cd -  
  5. make install

  如果安裝完成后pip3 出現:

  pip is configured with locations that require TLS/SSL

  安裝openssl & openssl-devel

  yum -y install openssl

  yum -y install openssl-devel

  重新安裝Python3

  1. ./configure --with-ssl 
  2. make
  3. sudo make install


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM