473,395 Members | 1,681 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

ImportError: No module named _md5

Hello,

Does anyone know how to fix this error when trying to build MySQL-
python-1.2.2:

python setup.py build
Traceback (most recent call last):
File "setup.py", line 5, in <module>
import ez_setup; ez_setup.use_setuptools()
File "/Users/jasonnerida/Downloads/MySQL-python-1.2.2/ez_setup.py",
line 83, in use_setuptools
egg = download_setuptools(version, download_base, to_dir,
download_delay)
File "/Users/jasonnerida/Downloads/MySQL-python-1.2.2/ez_setup.py",
line 111, in download_setuptools
import urllib2, shutil
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/urllib2.py", line 91, in <module>
import hashlib
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/hashlib.py", line 133, in <module>
md5 = __get_builtin_constructor('md5')
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/hashlib.py", line 60, in __get_builtin_constructor
import _md5
ImportError: No module named _md5

I then tried installing py25-hashlib via macports, which never
completes:

sudo port install py25-hashlib
Password:
Waiting for lock on /opt/local/var/macports/build/
_opt_local_var_macports_sources_rsync.macports.org _release_ports_python_py25-
hashlib/work/.macports.py25-hashlib.state

Do I need to completely reinstall python? I'm using 2.5.2 which
shipped with Leopard.

Thanks for any help,

Jason
Jul 1 '08 #1
1 5783
ne*****@gmail.com wrote:
Hello,

Does anyone know how to fix this error when trying to build MySQL-
python-1.2.2:

python setup.py build
Traceback (most recent call last):
File "setup.py", line 5, in <module>
import ez_setup; ez_setup.use_setuptools()
File "/Users/jasonnerida/Downloads/MySQL-python-1.2.2/ez_setup.py",
line 83, in use_setuptools
egg = download_setuptools(version, download_base, to_dir,
download_delay)
File "/Users/jasonnerida/Downloads/MySQL-python-1.2.2/ez_setup.py",
line 111, in download_setuptools
import urllib2, shutil
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/urllib2.py", line 91, in <module>
import hashlib
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/hashlib.py", line 133, in <module>
md5 = __get_builtin_constructor('md5')
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/hashlib.py", line 60, in __get_builtin_constructor
import _md5
ImportError: No module named _md5

I then tried installing py25-hashlib via macports, which never
completes:

sudo port install py25-hashlib
Password:
Waiting for lock on /opt/local/var/macports/build/
_opt_local_var_macports_sources_rsync.macports.org _release_ports_python_py25-
hashlib/work/.macports.py25-hashlib.state

Do I need to completely reinstall python? I'm using 2.5.2 which
shipped with Leopard.
Delete the directory

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org _release_ports_python_py25-hashlib/

and try building py25-hashlib again.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

Jul 1 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Carsten Gehling | last post by:
Figured out myself - I just removed the line with "from url import Url" -it doesn't seem to be used anywhere ;-) - Carsten > -----Oprindelig meddelelse----- > Fra:...
2
by: x-herbert | last post by:
Hi, I have a small test to "compile" al litle script as a WMI-Tester. The script include a wmi-wrapper and "insert" the Win32-modeles. here the code: my "WMI-Tester.py" ----- import wmi
0
by: M. Lavasani | last post by:
Hi I am trying to test Python-2.3. Any solution for this problem please: >>>gmake test case $MAKEFLAGS in \ *-s*)...
6
by: samn | last post by:
i compiled and installed the release version of python 2.5 for linux to a directory accessible to 2 computers, configured with --prefix=/usr/arch (which is accessible to both machines). the...
2
by: jeffself | last post by:
I'm running Python 2.5.1 which I'm getting from the MacPort package system. I just installed Django and tried to start up the Django server and I got the following error: ImportError: No module...
0
by: Robert Dailey | last post by:
I created a basic python file and made an attempt to execute it from the command line, however it gives me a weird error after the python file has been executed: Traceback (most recent call...
1
by: Prof Rodney Coates | last post by:
Although I have been using Macs for a quarter of a century and was doing scientific programming in the '60's I am VERY new to Python on the Mac. I have been writing some very simple applications and...
0
by: Barak, Ron | last post by:
Hi, I'm trying to compile using py2exe, and am getting the following: $ python_win Setup.py py2exe running py2exe creating c:\Documents and Settings\rbarak\rbarak_devel\dpm09\build creating...
4
by: Daniel | last post by:
Hello, I'm trying to build a very simple IPC system. What I have done is create Data Transfer Objects (DTO) for each item I'd like to send across the wire. I am serializing these using...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.