Can't Import Requests into Python: ImportError no module named urllib3

1.1k views Asked by At

I've searched on this but other examples I've come across are people having issues installing Requests, my issue is around importing the module:

Using Putty (connected to a HDF 2.4 sandbox session) and Python to call an API.

Last night, I had this working - installed the Requests module no problem, defined Python, and then made the GET request, worked perfect.

Tonight, I've followed the exact same steps, but when I try to 'Import Requests' I'm getting the error:

ImportError: No module named urllib3

The steps I've replicated from last night are:

[root@sandbox ~]# pip install requests  
python –v
import requests 

Figure I must have inadvertently changed something... Can anyone please advise?

1

There are 1 answers

0
Dennis Jaheruddin On

This is likely not reproducible anymore as the referenced sandbox should not be available anymore, but in general the recommended approach for sandbox troubles is to start with the fresh sandbox, it is typically faster than troubleshooting.