quote:
Originally posted by spconway1987
Origin Ver. and Service Release (Select Help-->About Origin): 2015 Sr2
Operating System: Windows 8
Hello,
I'm trying to use urllib2 Python module and I'm getting a no module named urllib2 error. The module works from the command prompt so I know it's in my path but I'm curious if Origin is looking in its own package store or something? Any help as to why Origin isn't recognizing the module is greatly appreciated. This is my first post so apologies if this post isn't done correctly!
Are you sure that you've switched to Python 2.7 in Origin? See the title of the script window, or check the system variable @pyv: @pyv = 3 suggests Python 3.x, and @pyv = 2 2.x.
As far as I can tell, on Windows 7, it looks in both the shipped packages and the ones in OS environment. Not sure about Windows 8. Check the sys.path after import sys.
If you are sure about the one used in Origin is Python 2.7, but fail again to import urllib2, have a try of this (given you have installed python 2.7 in C:\Python27:
import imp
imp.load_compiled('urllib2',r'C:\Python27\Lib\urllib2.pyc')
©c¡Ï ¤È¥¹ ©f¨u©c ©c¥ì ¥Î¤³ ©c/ ©¦£¯
©c¨Ê¥Î ¤´¥¨ ¥ó ¨× ¥ó¤á' ¥Ì©¦¥ /¤í ¥Õ©¦©f
¨Ö ¦á ©¦£þ ©` ¥Õ ©¦
©¦