Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

254
Vistas
No module named urllib3

I wrote a script to call an API and ran it successfully last week. This week, it won't run. I get back the following error message:

Traceback (most recent call last):
  File "user_audit.py", line 2, in <module>
    import requests
  File "c:\Python27\lib\site-packages\requests\__init__.py", line 60, in <module>
    from .packages.urllib3.exceptions import DependencyWarning
  File "c:\Python27\lib\site-packages\requests\packages\__init__.py", line 29, in <module>
    import urllib3
ImportError: No module named urllib3

I've confirmed that packages is up to date, tried uninstalling and reinstalling it, but nothing has worked so far. Can someone help?

ADDENDUM

I installed urllib3 as suggested by @MSHossain, but then got another error message. The new message referenced another file that I'd written, which had created a Python compiled file. The other file was using smptlib to attempt to send an email. I don't understand how this would happen, but I deleted the other file and my script ran without any problems. I've accepted the answer below as I was able to pip install urllib3, but it should have already been included in the requests module.

over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

Either urllib3 is not imported or not installed.

To import, use

import urllib3

at the top of the file. To install write:

pip install urllib3

into terminal.

It could be that you did not activate the environment variable correctly. To activate the environment variable, write

source env/bin/activate

into terminal. Here env is the environment variable name.

over 4 years ago · Santiago Trujillo Denunciar

0

pip install urllib3 

The reason it broke is that I had installed an incompatible version of urllib3 as a transient dependency of awscli. You'll see such conflicts when you rerun the install.

over 4 years ago · Santiago Trujillo Denunciar

0

I solved it by running

pip install --upgrade requests
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda