Skip to content
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

ctypes module problem #94

Closed
rmmcclay opened this issue Mar 15, 2011 · 2 comments
Closed

ctypes module problem #94

rmmcclay opened this issue Mar 15, 2011 · 2 comments

Comments

@rmmcclay
Copy link

@rmmcclay rmmcclay commented 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.

@grawity
Copy link
Contributor

@grawity grawity commented 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.)

@rg3
Copy link
Collaborator

@rg3 rg3 commented Mar 15, 2011

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

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.