-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFoundError: No module named '_ctypes' #13
Comments
The ctypes module is currently not built directly into the pryrun executable, but only as a shared lib. You can find the needed shared lib in the distribution archives under lib/python3.11/lib-dynlib/, Copying the lib-dynlib/ dir to /tmp/pyruntest/ should get things working. If you only need ctypes, you can also copy the _ctypes*.so file into the same dir where pyrun3.11 lives. This should normally also work. I'm a bit hesitant to include ctypes into the pyrun binary, since this introduces external dependencies on libffi, which may not be available everywhere (but I'm happy to be proven wrong on that one). |
What does https://github.com/indygreg/python-build-standalone/ do in this direction? |
It seems to include a statically linked version into the binary. I checked on various systems I have access to:
This makes it a rather poor candidate for inclusion as a shared dependency. I could investigate statically linking against libffi. It's a rather small lib, so this may be an option. |
Try to use
psycopg
witheGenix PyRun 3.11.9 (release 2.5.0)
results in:script to test this:
The text was updated successfully, but these errors were encountered: