Python: ImportError: No module named _md5

后端 未结 1 869
不思量自难忘°
不思量自难忘° 2020-12-20 12:11

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 
         


        
相关标签:
1条回答
  • 2020-12-20 12:42

    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?

    0 讨论(0)
提交回复
热议问题