7

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?

Ani Menon
  • 27,209
  • 16
  • 105
  • 126
Jon295087
  • 731
  • 1
  • 8
  • 28
  • have you tried pip install urllib3 ? – Nils Ziehn Jan 07 '17 at 22:29
  • Thanks @NilsZiehn - I've given this a try but would you believe this is now throwing the error: `ImportError: No module named moves.http_client` – Jon295087 Jan 07 '17 at 22:37
  • 1
    ...so I've tried to `pip install move.http_client` but this now throws the following: `InsecurePlatformWarning Could not find a version that satisfies the requirement moves.http-client (from versions: ) No matching distribution found for moves.http-client` – Jon295087 Jan 07 '17 at 22:40
  • Thanks @AniMenon for the additional tagging – Jon295087 Jan 08 '17 at 19:57
  • Just to close on this, I've abandoned trying to figure out a resolution on this issue. I'm instead using Apache Nifi to call the api and dump the data file straight into hdfs. – Jon295087 Jan 12 '17 at 22:34
  • I’m voting to close this question because we are already on HDF 3.5+ and the sandbox will have changed significantly since this was asked. – Dennis Jaheruddin Oct 24 '20 at 09:52

1 Answers1

0

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.

Dennis Jaheruddin
  • 21,208
  • 8
  • 66
  • 122