Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: batnas on June 17, 2010, 06:52:40 AM
-
Hi
I have a python-script (youtube-dl), that I will run in TC.
When the script tries to import hashlib.py, it fails with this error:
tc@box:/usr/local/bin$ /mnt/hda1/bin/youtube-dl http://www.youtube.com/watch?v=7
3dvrir5kig
Traceback (most recent call last):
File "/mnt/hda1/bin/youtube-dl", line 22, in <module>
import urllib2
File "/usr/local/lib/python2.6/urllib2.py", line 93, in <module>
import hashlib
File "/usr/local/lib/python2.6/hashlib.py", line 136, in <module>
md5 = __get_builtin_constructor('md5')
File "/usr/local/lib/python2.6/hashlib.py", line 63, in __get_builtin_constructor
import _md5
ImportError: No module named _md5
tc@box:/usr/local/bin$
I have installed python.tcz - I hink it is python version 2.6.5
Does anyone know how to solve this problem?
\\Batnas
EDIT:
after further investigation, it seems to me, that /usr/lib/python2.6/lib-dynload/_hashlib.so is missing
Is it correct?
Sorry, it was present
-
I saw something similar - as I recall, either hashlib has been depreciated in favour of something else, or the md5 module has been depreciated by something else.
Does google help?
-
I saw something similar - as I recall, either hashlib has been depreciated in favour of something else, or the md5 module has been depreciated by something else.
Does google help?
No need for Google, just documentation at www.python.org:
MD5 message digest algorithm
Deprecated since version 2.5: Use the hashlib module instead.
hashlib — Secure hashes and message digests¶
New in version 2.5.
This module implements a common interface to many different secure hash and message digest algorithms. Included are the FIPS secure hash algorithms SHA1, SHA224, SHA256, SHA384, and SHA512 (defined in FIPS 180-2) as well as RSA’s MD5 algorithm (defined in Internet RFC 1321). The terms secure hash and message digest are interchangeable. Older algorithms were called message digests. The modern term is secure hash.
-
It works now.
I did nothing but restart...
\\Batnas