+ 2

[SOLVED]No module named urllib2 error

i got this error. i dont know if it is going to appear at android but at windows it surely does. how to fix thi error? I added urllib3 (using python 3.6) so now what? https://code.sololearn.com/cOxZQk5tW7Jv/?ref=app

8th May 2018, 2:52 PM
Nikos Semertzidis
Nikos Semertzidis - avatar
7 Respuestas
+ 2
guys i found the answer. if you have added python to path.. it's a lot easier... just open a cmd and write inside 'pip install [module]' in this case... 'pip install urllib3' since we have now urllib3 not 2...
12th May 2018, 5:52 AM
Nikos Semertzidis
Nikos Semertzidis - avatar
+ 9
You have to install the modules you need, like bs4, as it's not part of the default, standard Python pack.
8th May 2018, 4:00 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 4
Yes, most likely. Also, there is a typo in the next imported module -- csv instead of scv. An important remark -- this won't go in Sololearn, as you can't install new modules yourself here.
9th May 2018, 7:02 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 3
[ Credits: Kuba Siekierzyński & @Kirk Schafer ] This should output the list of modules available on Sololearn: https://code.sololearn.com/c071JeXy6LcW/?ref=app
8th May 2018, 2:58 PM
Rahul George
Rahul George - avatar
+ 2
i dont know much about urllib2 but try: import urllib.request #instead of urllib2and use connection=urllib.request.urlopen(url you want to open) it should work fine Again you get error on beautiful soup so try on your machine with beatifulsoup installed and tell me if its working or not
8th May 2018, 5:49 PM
Uday
Uday - avatar
+ 1
i will see it later i have to leave home for now..
8th May 2018, 3:24 PM
Nikos Semertzidis
Nikos Semertzidis - avatar
+ 1
Kuba Siekierzyński i hope this works... so all i have to do is to install what? bs4?
9th May 2018, 6:51 PM
Nikos Semertzidis
Nikos Semertzidis - avatar