#131 ImportError: No module named urllib2

open
nobody
5
2013-06-20
2013-06-20
LeChosenOne
No

I am attempting to create a program that sends heartbeats to a website. I wrote it in python, and I want to convert the .py file into a standalone .exe using py2exe. The script works perfectly when debugged in the ide, but I get an ImportError: No module named urllib2 upon running the .exe . I tried to use httplib instead of urllib2 for the script, but there was another import error with httplib. I have tried everything from running "python setup.py py2exe --include urllib2" to trying to include urllib2 to the setup script. I have found several other issues about this on stackoverflow. Since no one has come out with a solution, there is a high chance that this is actually a bug.

Discussion