En RHEL 6.6, instalé Python 3.5.1 desde la fuente. Estoy tratando de instalar pip3 a través de get-pip.py, pero obtengo
Traceback (most recent call last):
  File "get-pip.py", line 19177, 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
Funciona para el Python 2.6.6 instalado. He buscado respuestas en línea, pero parece que no puedo encontrar ninguna que funcione para mí.
editar: yum search zlib
jzlib.i686 : JZlib re-implementation of zlib in pure Java
perl-Compress-Raw-Zlib.i686 : Low-Level Interface to the zlib compression library
perl-Compress-Zlib.i686 : A module providing Perl interfaces to the zlib compression library
perl-IO-Zlib.i686 : Perl IO:: style interface to Compress::Zlib
zlib.i686 : The zlib compression and decompression library
zlib-debuginfo.i686 : Debug information for package zlib
zlib-devel.i686 : Header files and libraries for Zlib development
perl-IO-Compress-Zlib.i686 : Perl interface to allow reading and writing of gzip and zip data
  Name and summary matches only, use "search all" for everything.
                
zlibpaquete?python3 get-pip.pypara mostrar el mensaje de error anterior, pero funcionapython get-pip.py. Sí puedo correryum search zlib.Respuestas:
Ubuntu 16.10+ y Python 3.7 dev
nota: solo puse esto aquí porque era el principal resultado de búsqueda del error, pero esto resolvió mi problema.
actualización: también el caso de ubuntu 14.04LTS y kernel base en 4.1+
fuente
La solucion es : #
yum install zlib-develfuente
Setting up Install Process rhel6_latest | 1.9 kB 00:00 Package zlib-devel-1.2.3-29.el6.i686 already installed and latest version Nothing to do, pero todavía recibo el error zipimport.no tienes una herramienta de descompresión, debes instalarla
zlib.Respuesta actualizada
primero verifique si está instalado
yum list python-gzipstreamSi no es así, ejecute lo siguiente para instalar
yum install python-gzipstream.noarchTengo esto instalado en mi sistema
fuente
yum install zlib. Entiendo que ya tengo la última versión. Todavía recibo el mismo error.yum list python-gzipstream, obtengoError: No matching Packages to list, y parayum install python-gzipstream.noarch, obtengoNo package python-gzipstream.noarch available. Error: Nothing to doyum repolist&yum search zlib.repo id repo name status rhel6_latest Red Hat Enterprise Linux 6Server - i386 - latest 11,637 repolist: 11,637Lanzando mis 2 centavos. He estado lidiando con este problema durante las últimas 3 horas y me di cuenta de que python3.6 para mí estaba instalado en / usr / local / bin /.
Rehice la configuración con --prefix == / usr / bin y pip instalado.
fuente
Simplemente copie y pegue este código :
fuente
El
zlibmódulo es una característica opcional para python y parece que la versión de python3.5 en RHEL 6.6 no lo incluye. Puedes verificar esto:Por lo tanto, deberá obtener una versión habilitada para zlib de python (o bibliotecas de python) o reconstruir python desde el origen con la función zlib habilitada; consulte aquí para obtener ayuda: https://stackoverflow.com/questions/12344970/building-python -from-source-with-zlib-support
fuente