Beginner: not sure why it is not running
achkeir opened this issue · 4 comments
hello,
when i am running the code, i am getting the following error:
Traceback (most recent call last):
File "C:\Users\shouks\MyPythonScripts\coinmarketcap_usd_history.py", line 11, in
import urllib2
ModuleNotFoundError: No module named 'urllib2'
any suggestions ?>
Seems like the package isn't installed on your system, but it's fairly straightforward to do.
1. Open a terminal window on your system, could be found by typing 'cmd' in the Start Menu for Windows.
2. Run "pip install urllib2"
Should work now, do this for all other packages in the future if you run into the same error message!
Maybe it is because you are in python 3 and there is not urllib2 in python 3.
I had the same error and I simply changed the first line to
#!/usr/bin/python2.7
I'm no python expert, so I don't know if @jhogan4288 wants this so I won't open a PR.
Note: This post states that one should not use liburl2 in python3 because of security concerns.