ctypes module problem #70

Closed
opened 2026-02-20 21:01:28 -05:00 by deekerman · 2 comments
Owner

Originally created by @rmmcclay on GitHub (Mar 15, 2011).

Just downloaded the latest youtube-dl and now this:

Traceback (most recent call last):
File "./youtube-dl", line 12, in
import ctypes
File "/usr/local/lib/python2.6/ctypes/init.py", line 10, in
from _ctypes import Union, Structure, Array
ImportError: No module named _ctypes

I realize this is probably a Python problem, but my searches have not revealed a fix. Guess I'll be using the old version until it quits working. My Linux box is old, but the Python is 2.6. It compiled fine and the former youtube-dl script works fine.

Originally created by @rmmcclay on GitHub (Mar 15, 2011). Just downloaded the latest youtube-dl and now this: Traceback (most recent call last): File "./youtube-dl", line 12, in <module> import ctypes File "/usr/local/lib/python2.6/ctypes/**init**.py", line 10, in <module> from _ctypes import Union, Structure, Array ImportError: No module named _ctypes I realize this is probably a Python problem, but my searches have not revealed a fix. Guess I'll be using the old version until it quits working. My Linux box is old, but the Python is 2.6. It compiled fine and the former youtube-dl script works fine.
Author
Owner

@grawity commented on GitHub (Mar 15, 2011):

It's a problem with your Python installation: it seems to be missing the _ctypes.so library. In this Debian system, it's /usr/lib/python2.6/lib-dynload/_ctypes.so. If you do have a lib-dynload directory, append it to the $PYTHONPATH environment variable and see if it helps. (To test, open the interactive shell and try import _ctypes. To see the current path, use import sys and sys.path.)

Consider using the packaged version of Python if your operating system offers one.

(As a last resort, you can comment out the import ctypes line; it is only used with the --console-title option on Win32.)

@grawity commented on GitHub (Mar 15, 2011): It's a problem with your Python installation: it seems to be missing the `_ctypes.so` library. In this Debian system, it's `/usr/lib/python2.6/lib-dynload/_ctypes.so`. If you _do_ have a `lib-dynload` directory, append it to the `$PYTHONPATH` environment variable and see if it helps. (To test, open the interactive shell and try `import _ctypes`. To see the current path, use `import sys` and `sys.path`.) Consider using the packaged version of Python if your operating system offers one. (As a last resort, you can comment out the `import ctypes` line; it is only used with the `--console-title` option on Win32.)
Author
Owner

@rg3 commented on GitHub (Mar 15, 2011):

I concur with grawity, so I'll close the issue.

@rg3 commented on GitHub (Mar 15, 2011): I concur with grawity, so I'll close the issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl#70
No description provided.