what libreria lib python pip nltk easy-install

python - libreria - pip problema de instalar casi cualquier biblioteca



nltk reference (24)

Hice lo siguiente en Windows 7 para resolver este problema.

c: / Archivos de programa / Python36 / Scripts> pip install beautifulsoup4 --trusted-host *

El --confiable-host parece solucionar el problema de SSL y * significa cada host.

Por supuesto, esto no funciona porque se producen otros errores, ya que no existe una versión que satisfaga el requisito de beautifulsoup4, pero no creo que el problema esté relacionado con la pregunta general.

Me cuesta trabajo usar pip para instalar casi cualquier cosa. Soy nuevo en la codificación, así que pensé que tal vez esto es algo que he estado haciendo mal y opté por la instalación fácil para obtener la mayor parte de lo que necesitaba hacer, lo que generalmente ha funcionado. Sin embargo, ahora estoy intentando descargar la biblioteca nltk, y ninguno de los dos está haciendo el trabajo.

Intenté entrar

sudo pip install nltk

pero obtuvo la siguiente respuesta:

/Library/Frameworks/Python.framework/Versions/2.7/bin/pip run on Sat May 4 00:15:38 2013 Downloading/unpacking nltk Getting page https://pypi.python.org/simple/nltk/ Could not fetch URL [need more reputation to post link]: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm> Will skip URL [need more reputation to post link]/simple/nltk/ when looking for download links for nltk Getting page [need more reputation to post link]/simple/ Could not fetch URL https://pypi.python. org/simple/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm> Will skip URL [need more reputation to post link] when looking for download links for nltk Cannot fetch index base URL [need more reputation to post link] URLs to search for versions for nltk: * [need more reputation to post link] Getting page [need more reputation to post link] Could not fetch URL [need more reputation to post link]: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm> Will skip URL [need more reputation to post link] when looking for download links for nltk Could not find any downloads that satisfy the requirement nltk No distributions at all found for nltk Exception information: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/basecommand.py", line 139, in main status = self.run(options, args) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/commands/install.py", line 266, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 1026, in prepare_files url = finder.find_requirement(req_to_install, upgrade=self.upgrade) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/index.py", line 171, in find_requirement raise DistributionNotFound(''No distributions at all found for %s'' % req) DistributionNotFound: No distributions at all found for nltk --easy_install installed fragments of the library and the code ran into trouble very quickly upon trying to run it.

¿Alguna sugerencia en este asunto? Realmente agradecería algunos comentarios sobre cómo puedo hacer que funcione el pip o algo para solucionar el problema mientras tanto.



Me pareció suficiente para especificar el host pypi como de confianza. Ejemplo:

pip install --trusted-host pypi.python.org pytest-xdist pip install --trusted-host pypi.python.org --upgrade pip

Esto solucionó el siguiente error:

Could not fetch URL https://pypi.python.org/simple/pytest-cov/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600) - skipping Could not find a version that satisfies the requirement pytest-cov (from versions: ) No matching distribution found for pytest-cov

Actualización de abril de 2018 : para cualquier persona que obtenga el error TLSV1_ALERT_PROTOCOL_VERSION: no tiene nada que ver con el problema de verificación / host de confianza del OP o esta respuesta. Más bien, el error TLSV1 se debe a que su intérprete no es compatible con TLS v1.2, debe actualizar su intérprete. Ver, por ejemplo, https://news.ycombinator.com/item?id=13539034 , http://pyfound.blogspot.ca/2017/01/time-to-upgrade-your-python-tls-v12.html y https://bugs.python.org/issue17128 .


Otra causa de errores de SSL puede ser una mala hora del sistema: los certificados no se validarán si están muy lejos del presente.


Para instalar cualquier otro paquete, tengo que usar la última versión de pip, ya que el 9.0.1 tiene este problema de SSL. Para actualizar el pip por pip, primero tengo que resolver este problema de SSL. Para saltar de este bucle sin fin, encuentro esta única manera que funciona para mí.

  1. Encuentre la última versión de pip en esta página: https://pypi.org/simple/pip/
  2. Descarga el archivo .whl de la última versión.
  3. Utilice pip para instalar la última pip. (Usa tu propia última versión aquí)

sudo pip install pip-10.0.1-py2.py3-none-any.whl

Ahora el pip es la última versión y puede instalar cualquier cosa.


Para mí, el último pip (1.5.6) funciona bien con el paquete nltk inseguro si le dices que no sea tan exigente con la seguridad:

pip install --upgrade --force-reinstall --allow-all-external --allow-unverified ntlk nltk


Probablemente estás viendo este error ; Véase también here .

La solución más sencilla es degradar pip a uno que no use SSL: easy_install pip==1.2.1 . Esto le pierde el beneficio de seguridad de usar SSL. La solución real es utilizar una distribución de Python vinculada a una biblioteca SSL más reciente.


Pypi quitó soporte para versiones TLS menores a 1.2

Necesitas volver a instalar Pip, hacer

curl https://bootstrap.pypa.io/get-pip.py | python

o para Python global:

curl https://bootstrap.pypa.io/get-pip.py | sudo python


Resolví este problema con los siguientes pasos (en sles 11sp2)

zypper remove pip easy_install pip=1.2.1 pip install --upgrade scons

Aquí están los mismos pasos en títere (que debería funcionar en todas las distribuciones)

package { ''python-pip'': ensure => absent, } exec { ''python-pip'': command => ''/usr/bin/easy_install pip==1.2.1'', require => Package[''python-pip''], } package { ''scons'': ensure => latest, provider => pip, require => Exec[''python-pip''], }


Según lo publicado anteriormente por blackjar, las líneas de abajo funcionaron para mí

pip --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org install xxx

Necesitas dar las tres --trusted-host options . Estaba intentando solo con el primero después de ver las respuestas, pero no me funcionó de esa manera.


Si se está conectando a través de un proxy, ejecute export https_proxy=<your_proxy> (en Unix o Git Bash) y luego vuelva a intentar la instalación.

Si está usando Windows cmd, esto cambia para set https_proxy=<your_proxy> .


Si solo se trata de nltk, una vez tuve un problema similar. Pruebe la siguiente guía para la instalación. Instalar NLTK

Si está seguro de que no funciona con ningún otro módulo, es posible que tenga problemas con diferentes versiones de Python instaladas.

O inténtalo para ver si dice que pip ya está instalado.

sudo apt-get install python-pip python-dev build-essential

y ver si funciona.


Simplemente desinstale y vuelva a instalar los paquetes pip que entrenará para ustedes.

Mac os versión: alta sierra 10.13.6

Versión de python: 3.7

Así que desinstalé el pip anterior e instalé la versión más reciente 10.0.0 ingresando esto:

python3 -m pip uninstall pip setuptools curl https://bootstrap.pypa.io/get-pip.py | python3

Ahora mi problema estaba resuelto. Si está utilizando python2, puede sustituirlo por python3. Espero que también te funcione.


También puede usar conda para instalar paquetes: consulte http://conda.pydata.org

conda install nltk

La mejor manera de usar conda es descargar Miniconda, pero también puedes probar

pip install conda conda init conda install nltk


Tuve esto con PyCharm y la actualización de pip a 10.0.1 rompió pip con el error "''main'' no encontrado en el módulo".

Podría resolver este problema instalando pip 9.0.3 como se ve en otro hilo. Estos son los pasos que hice:

  1. Descargué la versión 9.0.3 de pip de https://pypi.org/simple/pip/ (ya que pip no se podía usar para instalarla).
  2. Instale pip 9.0.3 desde tar.gz python -m pip instale pip-9.0.3.tar.gz

Todo empezó a funcionar después de eso.


Usé pip3 versión 9.0.1 y no pude instalar ningún paquete recientemente a través del comando pip3 install .

Versión Mac 10.11.5 : EI Captain 10.11.5 .

Versión de Python: 3.5

Intenté el comando:

curl https://bootstrap.pypa.io/get-pip.py | python

No funcionó para mí.

Así que desinstalé el pip anterior e instalé la versión más reciente 10.0.0 ingresando esto:

python3 -m pip uninstall pip setuptools curl https://bootstrap.pypa.io/get-pip.py | python3

Ahora mi problema estaba resuelto. Si está utilizando python2, puede sustituirlo por python3. Espero que también te funcione.



Utilicé pip versión 9.0.1 y tuve el mismo problema, todas las respuestas anteriores no resolvieron el problema y no pude instalar python / pip con brew por otras razones.

Actualizar pip a 9.0.3 solucionó el problema. Y como no pude actualizar pip con pip, descargué la fuente y la instalé manualmente.

  1. Descargue la versión correcta de pip de - https://pypi.org/simple/pip/
  2. sudo python3 pip-9.0.3.tar.gz - Instalar pip

O puedes instalar pip más nuevo con:

curl https://bootstrap.pypa.io/get-pip.py | python


Yo tuve el mismo problema. Acabo de actualizar el python de 2.7.0 a 2.7.15 . Resuelve el problema.

Puedes descargarlo here .


intentó

pip --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org install xxx

y finalmente funcionó, no entiendo bien por qué se cambia el dominio pypi.python.org.


macOS Sierra 10.12.6. No se pudo instalar nada a través de pip (python instalado a través de homebrew). Todas las respuestas anteriores no funcionaron.

Eventualmente, la actualización de Python 3.5 a 3.6 funcionó.

brew update brew doctor #(in case you see such suggestion by brew)

luego siga las sugerencias adicionales de elaboración, es decir, sobrescriba el enlace a python.



--trusted-host pypi.python.org un problema similar agregando la --trusted-host pypi.python.org


Solución : instale cualquier paquete marcando a continuación los hosts de confianza

  • pypi.python.org
  • pypi.org
  • archivos.pythonhosted.org

Solución temporal

pip install --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org {package name}

Solución permanente : actualice su PIP (problema con la versión 9.0.1) a la última versión.

pip install --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org pytest-xdist python -m pip install --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org --upgrade pip