Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #27270
| From | wdtate@comcast.net |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Python 2.7 import socket urllib fails to load, module not found |
| Date | 2012-08-17 14:22 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <ab893bbe-9928-4cfb-a911-92f813413abb@googlegroups.com> (permalink) |
| References | <22db6f61-180c-47ce-a0c3-3315b40b8315@googlegroups.com> <mailman.3429.1345232370.4697.python-list@python.org> <1726c197-b2bb-47d8-982f-9f26af1e310d@googlegroups.com> <mailman.3432.1345237052.4697.python-list@python.org> <mailman.3433.1345238143.4697.python-list@python.org> |
On Friday, August 17, 2012 5:15:35 PM UTC-4, (unknown) wrote: > > > > > So, try the following in both environments: > > > import sys > > > for ii in sys.path: print ii > > > > > > You'll likely find diffferences between the two. > > > > > In the pythonwin environment, try: > > > > > > > > > > > > import socket > > > > > > print socket.__file__ > > > > > > > > > Chances are the __file__'s directory isn't in the command line's sys.path. > > > > > > > > > > > > Emile > > > > Done - tail end of the python path had a missing bit...grrrrr... thanks so much Well it's bizarre - now it doesn't. did an import sys from within interpreter, then did import socket. Worked the first time. Restarted and it happened again. The sys.path outputs are identical. The print socket.__file__ reveals a file that is in the sys.path...grrrr. On Friday, August 17, 2012 5:15:35 PM UTC-4, (unknown) wrote: > > > > > So, try the following in both environments: > > > import sys > > > for ii in sys.path: print ii > > > > > > You'll likely find diffferences between the two. > > > > > In the pythonwin environment, try: > > > > > > > > > > > > import socket > > > > > > print socket.__file__ > > > > > > > > > Chances are the __file__'s directory isn't in the command line's sys.path. > > > > > > > > > > > > Emile > > > > Done - tail end of the python path had a missing bit...grrrrr... thanks so much On Friday, August 17, 2012 5:15:35 PM UTC-4, (unknown) wrote: > > > > > So, try the following in both environments: > > > import sys > > > for ii in sys.path: print ii > > > > > > You'll likely find diffferences between the two. > > > > > In the pythonwin environment, try: > > > > > > > > > > > > import socket > > > > > > print socket.__file__ > > > > > > > > > Chances are the __file__'s directory isn't in the command line's sys.path. > > > > > > > > > > > > Emile > > > > Done - tail end of the python path had a missing bit. Corrected that. the sys.path outputs match but I still have the same problem. print socket.__file__ produces a path that is in the pythonpath.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Python 2.7 import socket urllib fails to load, module not found wdtate@comcast.net - 2012-08-17 12:20 -0700
Re: Python 2.7 import socket urllib fails to load, module not found Emile van Sebille <emile@fenx.com> - 2012-08-17 12:39 -0700
Re: Python 2.7 import socket urllib fails to load, module not found wdtate@comcast.net - 2012-08-17 13:41 -0700
Re: Python 2.7 import socket urllib fails to load, module not found Emile van Sebille <emile@fenx.com> - 2012-08-17 13:57 -0700
Re: Python 2.7 import socket urllib fails to load, module not found wdtate@comcast.net - 2012-08-17 14:15 -0700
Re: Python 2.7 import socket urllib fails to load, module not found wdtate@comcast.net - 2012-08-17 14:22 -0700
Re: Python 2.7 import socket urllib fails to load, module not found Emile van Sebille <emile@fenx.com> - 2012-08-17 15:40 -0700
Re: Python 2.7 import socket urllib fails to load, module not found wdtate@comcast.net - 2012-08-17 14:22 -0700
Re: Python 2.7 import socket urllib fails to load, module not found wdtate@comcast.net - 2012-08-17 14:15 -0700
Re: Python 2.7 import socket urllib fails to load, module not found wdtate@comcast.net - 2012-08-17 13:41 -0700
Re: Python 2.7 import socket urllib fails to load, module not found wdtate@comcast.net - 2012-08-17 14:21 -0700
Re: Python 2.7 import socket urllib fails to load, module not found Christian Heimes <lists@cheimes.de> - 2012-08-18 00:58 +0200
csiph-web