This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Python 2.6 - ctypes (specifically _ctypes) cannot be imported - Eclipse pydev integration broken as a result
- From: "Kay Drangmeister" <kay at drangmeister dot net>
- To: cygwin at cygwin dot com
- Date: Wed, 23 Jun 2010 10:37:30 +0200
- Subject: Python 2.6 - ctypes (specifically _ctypes) cannot be imported - Eclipse pydev integration broken as a result
Hi.
I updated cygwin a day ago and thus upgraded from python 2.5 to python 2.6.
Now the eclipse integration (pydev plugin) does no longer work correctly,
I drilled down the problem to the issue that ctypes cannot be imported
correctly. (This worked with python 2.5.)
(Starting up a cygwin-bash)
$ python
Python 2.6.5 (r265:79063, Jun 12 2010, 17:07:01)
[GCC 4.3.4 20090804 (release) 1] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
import ctypes
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/ctypes/__init__.py", line 10, in <module>
from _ctypes import Union, Structure, Array
ImportError: No such file or directory
import _ctypes
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No such file or directory
import somethingunknown
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named somethingunknown
As you can see, _ctypes is well known to python, because the error is "No such file
or directory". Otherwise (see last command) the error message would be "No module
named _ctypes".
A look in the directory for DLLs gives the following:
$ ls -l /usr/lib/python2.6/lib-dynload/ | grep cty
-rwxr-xr-x 1 dran01 root 91150 2010-06-12 23:11 _ctypes.dll
-rwxr-xr-x 1 dran01 root 14862 2010-06-12 23:11 _ctypes_test.dll
Other DLLs from this directory import correctly, e.g. _ctypes_test :
$ python
Python 2.6.5 (r265:79063, Jun 12 2010, 17:07:01)
[GCC 4.3.4 20090804 (release) 1] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
import _ctypes_test
So the problem is "clearly" a broken _ctypes.dll
Can I do something specific to track down the problem further?
Kind regards,
Kay Drangmeister
P.S. For the interested: The problem with Eclipse-Plugin pydev is:
No output was in the standard output when trying to create the interpreter info.
The error output contains:
Traceback (most recent call last):
File "C:\Java\eclipse35SR1\plugins\org.python.pydev_1.5.7.2010050621\PySrc\interpreterInfo.py", line 33, in <module>
import ctypes
File "/usr/lib/python2.6/ctypes/__init__.py", line 10, in <module>
from _ctypes import Union, Structure, Array
ImportError: No such file or directory
<<
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple