MySQL-python Windows 64bit and 32bit distributions

I have built two 64bit and two 32bit Windows distributions of the MySQLdb module for Python 2.6.x for both the stable 1.2.2 and the beta 1.2.3c1 versions.

It seems there were no 64bit distribution for Windows (at least for Python 2.6.x) in public and some of the 32bit ones I have tried had not been built with charset support for languages like greek or hebrew (not that I need them since the encoding I use is utf-8).

You can download the distributions from here:

  MySQL-python-1.2.2.win32-py2.6.exe (1,022.8 KiB)

  MySQL-python-1.2.2.win-amd64-py2.6.exe (1.0 MiB)

  MySQL-python-1.2.3c1.win32-py2.6.exe (1,023.2 KiB)

  MySQL-python-1.2.3c1.win-amd64-py2.6.exe (1.0 MiB)

UPDATE – Embedded binaries also available:

For the 64bit embedded versions get:

  MySQL-python-embedded-1.2.2.win-amd64-py2.6.exe (261.0 KiB)

  MySQL-python-embedded-1.2.3c1.win-amd64-py2.6.exe (261.4 KiB)

For the 32bit embedded versions get:

  MySQL-python-embedded-1.2.2.win32-py2.6.exe (231.9 KiB)

  MySQL-python-embedded-1.2.3c1.win32-py2.6.exe (232.3 KiB)

The embedded versions are linked against libmysqld.dll which must be present in the program directory (you will get a dll load fail if it isn’t there) and the share directory must also exist or else the program will crash in MySQLdb.server_init().

25 Responses to “MySQL-python Windows 64bit and 32bit distributions”

  1. Have you had any luck building Windows distributions that use embedded MySQL? I have not been able to get this to work since the combination of MySQLdb 1.2.0 and MySQL 4.0.25. Any help you could provide would be greatly appreciated.

  2. Never tried the embedded build until now.

    The news are good, I just made two succesfull 64bit builds of the embedded server (libmysqld.dll) and finished some tests.

    The build environment consisted of Windows Vista Business 64bit SP1, Python 2.6.2 x64, MySQL 5.1.33 x64, VS2008 Pro SP1 and MySQL-python 1.2.3c1 and 1.2.2.

    I have updated my original post with these 64bit builds and this Saturday will add the 32bit versions.

  3. Thanks for this, I was on the way to start a VM just for this. You saved me a lot of time :)

  4. Thanks a lot for these! A real lifesaver, Python 2.6 + MySQL on Windows used to be a real pain until I saw this post.

    Cheers!

  5. Great – I wish I found this site half a day earlier.
    Thanks a lot

  6. Thank you for sharing your work!

  7. [...] Read more from the original source: MySQL-python Windows 64bit and 32bit distributions [...]

  8. Can you give some help on getting the installer to see the registry path for Python? I’ve checked, its there, but the installer can’t see it.

    Thanks

  9. Hi Ioannis, thank you for sharing this great work!

    I was searching for an embedded MySQL and found your great blog. I really need your help.. Do you have a distribution for win32 & Python 2.5?

  10. This was a real lifesaver. I have had the hardest time getting the library compiled on Windows for use with Python 2.6 and this worked fined. Thanks again.

  11. Hey I noticed that I get a Warning when using the module:

    Warning (from warnings module):
    File “C:\Python26\lib\site-packages\MySQLdb\__init__.py”, line 34
    from sets import ImmutableSet
    DeprecationWarning: the sets module is deprecated

    Not a big deal, just a heads up for anyone on python 2.6. I was getting really frustrated with mysql-python until I found this! Great work.

  12. спасибо мужик :)

  13. Thanks so much, this has really helped me out.

  14. Thanks a lot :) Great job

  15. If you’re on Windows (I’m using Windows 7 64-bit) and get the error that python version 2.6 is not found in the registry (might just be a problem with ActiveState), just manually add the registry keys so this exists:

    HKLM\Software\Python\PythonCore\2.6\InstallPath

    Then change the value of (Default) under that key to “C:\python26″ or your own path\to\python2.6

    Installation of the above files should work then.

  16. Thank you, David, for your comments on the 64-bit issue, it has really been helpful.

  17. Hello,

    I’m trying to get Py 2.6 and Mysql running on a windows 7 (64-Bit) system.
    It works fine – thanx a lot!

    The only problem I experienced is the following:
    The installer stops with windows exception (I don’t know how to call it) if I don’t use the predefined path. (I tried the “german” path c:\programme\python26

    Any ideas?

    Thomas

  18. I am running under vista 64, I’ve installed mysql but running my python file i get this errormessage:

    from MySQLdb import connect
    File “C:\Python26\lib\site-packages\MySQLdb\__init__.py”, line 19, in
    import _mysql
    ImportError: DLL load failed: %1 is geen geldige Win32-toepassing.

    Any suggestions how to avoid this? Thanks

  19. thanks a lot with tears
    you are so great!!

  20. Can you run MySQL-python-1.2.3c1.win32-py2.6.exe and MySQL-python-embedded-1.2.3c1.win32-py2.6.exe side by side?

    if so how?

    I tried and it didn’t seem to work.

  21. OMG I LOVE YOU. THANK YOU SO MUCH.

    I just wasted four hours of my life trying to get Visual C and mingw and distutils and Python to all play nicely on 64bit Vista. And then I spent all of thirty seconds clicking next and install in your application.

    Thanks again!

  22. Thanks for providing these. Saved me much time with a Windows installation of a Django web site.

  23. When i try using the “MySQL-python-1.2.2.win-amd64-py2.6.exe”, the installer freezes during setup and I don’t know why. I am using Python 2.6.4 64-bit on windows 7 64-bit.

    Thank you.

  24. God bless you for this builds. There are good people on this world :)

  25. Thanks for the build and the tip for windows 7 64 bit. I am also trying to run Django but keep getting “Error loading MySQLdb module: DLL load failed with error code 193″. I have tried to put the DLL file in the python directory and my project directory and the mysqlDB package directory but no lucky. Could you suggest me what does “program directory” exactly mean?
    Thanks in advance.

Leave a Reply