X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.2 required=5.0 tests=AWL,BAYES_05,RCVD_IN_DNSWL_LOW,TW_RW,TW_WX X-Spam-Check-By: sourceware.org X-pair-Authenticated: 195.71.159.150 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: cygwin AT cygwin DOT com Subject: Python 2.6 - ctypes (specifically _ctypes) cannot be imported - Eclipse pydev integration broken as a result Date: Wed, 23 Jun 2010 10:37:30 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Kay Drangmeister" Message-ID: User-Agent: Opera Mail/10.54 (Win32) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 "", line 1, in File "/usr/lib/python2.6/ctypes/__init__.py", line 10, in from _ctypes import Union, Structure, Array ImportError: No such file or directory >>> import _ctypes Traceback (most recent call last): File "", line 1, in ImportError: No such file or directory >>> import somethingunknown Traceback (most recent call last): File "", line 1, in 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 import ctypes File "/usr/lib/python2.6/ctypes/__init__.py", line 10, in 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