Issue2335
Created on 2015-04-22.08:52:44 by buildhappy, last changed 2015-04-23.03:42:29 by zyasoft.
msg9922 (view) |
Author: buildhappy (buildhappy) |
Date: 2015-04-22.08:52:43 |
|
Exception in thread "main" Traceback (most recent call last):
File "/home/xxx/develop/test-virtualen/simplyTest.py", line 4, in <module>
import requests
File "/home/xxx/virtualenv/py2env/lib/python2.7/site-packages/requests/__init__.py", line 58, in <module>
from . import utils
File "/home/xxx/virtualenv/py2env/lib/python2.7/site-packages/requests/utils.py", line 12, in <module>
import cgi
File "/usr/lib/python2.7/cgi.py", line 40, in <module>
import urllib
File "/usr/lib/python2.7/urllib.py", line 26, in <module>
import socket
File "/usr/lib/python2.7/socket.py", line 47, in <module>
import _socket
ImportError: No module named _socket
|
msg9923 (view) |
Author: Jim Baker (zyasoft) |
Date: 2015-04-22.13:20:26 |
|
_socket module is part of Lib/, and necessary if you have been able to install pip/setuptools with ensurepip in the installation. Check your sys.path and verify that one of the entries points to your Lib directory and that Lib/_socket.py is present
|
msg9924 (view) |
Author: Jim Baker (zyasoft) |
Date: 2015-04-22.13:43:30 |
|
It's a path issue: in your configuration, you are including the CPython standard library, which is not compatible with Jython's version.
Specifically
"/usr/lib/python2.7/socket.py"
is not going to work at all with Jython's version.
Check your JYTHONPATH. Also when testing your config, don't run Jython in the context of the pyenv tool - this may work, as a third-party tool, but it's not something I have run and it certainly adds one more factor of complexity.
|
|
Date |
User |
Action |
Args |
2015-04-23 03:42:29 | zyasoft | set | status: open -> closed |
2015-04-22 13:43:30 | zyasoft | set | resolution: invalid messages:
+ msg9924 |
2015-04-22 13:20:26 | zyasoft | set | nosy:
+ zyasoft messages:
+ msg9923 |
2015-04-22 08:52:44 | buildhappy | create | |
|