Hi All,
I upgraded a machine to 6.1 and now having trouble importing the ctypes
module in python2.7. I've tried reinstalling the python package, no luck. I'm
running this with /usr mounted wxallowed.
Any ideas?
>>> import ctypes
# trying ctypes.so
# trying ctypesmodule.so
# trying ctypes.py
# trying ctypes.pyc
import ctypes # directory /usr/local/lib/python2.7/ctypes
# trying /usr/local/lib/python2.7/ctypes/__init__.so
# trying /usr/local/lib/python2.7/ctypes/__init__module.so
# trying /usr/local/lib/python2.7/ctypes/__init__.py
# /usr/local/lib/python2.7/ctypes/__init__.pyc matches
/usr/local/lib/python2.7/ctypes/__init__.py
import ctypes # precompiled from /usr/local/lib/python2.7/ctypes/__init__.pyc
# trying /usr/local/lib/python2.7/ctypes/os.so
# trying /usr/local/lib/python2.7/ctypes/osmodule.so
# trying /usr/local/lib/python2.7/ctypes/os.py
# trying /usr/local/lib/python2.7/ctypes/os.pyc
# trying /usr/local/lib/python2.7/ctypes/sys.so
# trying /usr/local/lib/python2.7/ctypes/sysmodule.so
# trying /usr/local/lib/python2.7/ctypes/sys.py
# trying /usr/local/lib/python2.7/ctypes/sys.pyc
# trying /usr/local/lib/python2.7/ctypes/_ctypes.so
# trying /usr/local/lib/python2.7/ctypes/_ctypesmodule.so
# trying /usr/local/lib/python2.7/ctypes/_ctypes.py
# trying /usr/local/lib/python2.7/ctypes/_ctypes.pyc
# trying _ctypes.so
# trying _ctypesmodule.so
# trying _ctypes.py
# trying _ctypes.pyc
# trying /usr/local/lib/python2.7/_ctypes.so
# trying /usr/local/lib/python2.7/_ctypesmodule.so
# trying /usr/local/lib/python2.7/_ctypes.py
# trying /usr/local/lib/python2.7/_ctypes.pyc
# trying /usr/local/lib/python2.7/plat-openbsd6/_ctypes.so
# trying /usr/local/lib/python2.7/plat-openbsd6/_ctypesmodule.so
# trying /usr/local/lib/python2.7/plat-openbsd6/_ctypes.py
# trying /usr/local/lib/python2.7/plat-openbsd6/_ctypes.pyc
# trying /usr/local/lib/python2.7/lib-dynload/_ctypes.so
dlopen("/usr/local/lib/python2.7/lib-dynload/_ctypes.so", 2);
# clear[1] _os
# clear[1] _sys
# clear[2] __file__
# clear[2] __package__
# clear[2] __path__
# clear[2] __name__
# clear[2] __version__
# clear[2] __doc__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/ctypes/__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ImportError: Cannot load specified object
>>>
# ls -l /usr/local/lib/python2.7/lib-dynload/_ctypes.so
-rwxr-xr-x 1 root bin 151375 Apr 1 21:51
/usr/local/lib/python2.7/lib-dynload/_ctypes.so
# file /usr/local/lib/python2.7/lib-dynload/_ctypes.so
/usr/local/lib/python2.7/lib-dynload/_ctypes.so: ELF 64-bit LSB shared object,
x86-64, version 1
# uname -a
OpenBSD krang.quernus.co.uk 6.1 GENERIC#0 amd64
# mount
/dev/sd0a on / type ffs (local)
/dev/sd0g on /home type ffs (local, nodev, nosuid)
mfs:71126 on /tmp type mfs (asynchronous, local, nodev, noexec, nosuid,
size=102400 512-blocks)
/dev/sd0f on /usr type ffs (local, nodev, wxallowed)
/dev/sd0e on /var type ffs (local, noatime, nodev, nosuid)
-Matt
—
Matt Hamilton
Quernus
[email protected]
+44 117 325 3025
64 Easton Business Centre
Felix Road, Easton
Bristol, BS5 0HE
Quernus Ltd is a company registered in England and Wales. Registered number:
09076246