Hello -
I have always used urllib2 to get info from other websites. I noticed it wasn't installed, so I went into the bash console and installed it:
17:11 ~ $ pip install --user urllib2
Collecting urllib2
Using cached urllib2-1498656401.94-py2-none-any.whl
Installing collected packages: urllib2
Successfully installed urllib2-1498656401.94
Great! Now, I go to run my code with urllib2:
import urllib2
from urllib2 import Request, urlopen
Traceback (most recent call last):
File "/path/to/python/script.py", line 1, in <module>
import urllib2
ImportError: No module named 'urllib2'
So, I try installing different versions of urllib2, and all to no avail. Why is it that the script I'm running is not recognizing the module even after I installed it?
Also, maybe urllib2 could be part of the "batteries included"?