I have python 2.5.1 installed on my Ubuntu 10.04 x86_64 machine.
When i try to import hashlib/md5, the i get this error
>>> import hashlib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.5/hashlib.py", line 133, in <module>
md5 = __get_builtin_constructor('md5')
File "/usr/local/lib/python2.5/hashlib.py", line 60, in __get_builtin_constructor
import _md5
ImportError: No module named _md5
I have tried most of the solutions that I could find on google, but nothing works for me. Does anyone know how to solve this? Thank you!
You have to have the package libssl-dev installed before configuring and compiling python from the tarball:
sudo apt-get install libssl-dev
cd YOUR_PYTHON_2.5_1_SRC_DIR
make clean
./configure
make
sudo make install
Do you have a good reason not to use the latest version in the 2.5.X series?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With