MySQL-python-1.2.3b2.win32-py2.6.exe

2009-03-16
2012-09-19
  • Andrija Frincic

    Andrija Frincic - 2009-03-16

    Prebuilt installation for windows platform is available on http://www.thescotties.com/mysql-python/test/.
    Module has been built using: mysql-5.1.31-win3 and Microsoft Visual C++ 2008 Express Edition.

    Best regards

     
    • anatoly techtonik

      It fails to install from source if no MySQL is installed on target system without any descriptive error message.

      >python -m easy_install MySQL-python
      Searching for MySQL-python
      Reading http://pypi.python.org/simple/MySQL-python/
      Reading http://sourceforge.net/projects/mysql-python
      Reading http://sourceforge.net/projects/mysql-python/
      Best match: MySQL-python 1.2.3c1
      Downloading http://osdn.dl.sourceforge.net/sourceforge/mysql-python/MySQL-python-1.2.3c1.tar.gz
      Processing MySQL-python-1.2.3c1.tar.gz
      Running MySQL-python-1.2.3c1\setup.py -q bdist_egg --dist-dir c:\docume~1\user\locals~1\temp\easy_install-nw-cu1\MySQL-python-1.2.3c1\egg-dist-tmp-b6z1px
      error:

      The reason is that there is no error handling/reporting after OpenKey() call.
      D:\MySQL-python-1.2.3c1>setup.py install
      Traceback (most recent call last):
      File "D:\MySQL-python-1.2.3c1\setup.py", line 15, in <module>
      metadata, options = get_config()
      File "D:\MySQL-python-1.2.3c1\setup_windows.py", line 7, in get_config
      serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key'])
      WindowsError: [Error 2]

       
      • Andy Dustman

        Andy Dustman - 2009-04-23

        What do you think it should do? I guess it could say "Install MySQL first..." The exact registry key is in site.cfg. This won't fix easy_install, though, but you can use setup.py install (or bdist_windows or whatever it is)

         
        • anatoly techtonik

          I think it should state the reason for the error "Installation Error: MySQL installation required." and point to documentation for more info - "Please see README for details."

           
    • Andy Dustman

      Andy Dustman - 2009-03-16

      Any sort of patching or tweaking you needed to do to build on WIndows? I imagine site.cfg slightly so that it looks for the right registry key due to the default being MySQL-5.0.

       
      • Andrija Frincic

        Andrija Frincic - 2009-03-19

        Actually i changed two files. First inside _mysql.c I add additional include just before “#include <windows.h>”, so beginning of _mysql.c now looks like:

        if defined(_WIN32) || defined(_WIN64) || defined(WIN32) || defined(WIN32) || defined(MS_WIN32)

        include <winsock2.h>

        include <windows.h>

        include <config-win.h>.

        Additionally I changed setup_windows.py and there I replaced two lines that get library path from registry with one when that path is hardcoded:

        serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key'])

        mysql_root, dummy = _winreg.QueryValueEx(serverKey,'Location')

        mysql_root = "C:\Projects\Misc\mysql-python\mysql-5.1.31-win32"

        Better way will be to get this value form site.cfg. So we could change setup_windows to check if mysql_root exists inside options. If exist that it should be used to build library path for mysql if doues not exist registry key should be used as currently implemented.

        Best regards

         
        • kalyan c

          kalyan c - 2009-07-16

          Hi
          I am using Python 2.6.1 , MySQL-4.0 and windows platform I want to install MySQLdb in my system, I tried http://www.codegood.com/archives/4 from this site but after installed successfull and after running my application its showing error as "No module named MySQLdb"

          can any one suggest me proper setup to mysquldb, its urgent for me

          Thanks in advance

           
    • Andrija Frincic

      Andrija Frincic - 2009-03-17

      Actually i changed two files. First inside _mysql.c I add additional include just before “#include <windows.h>”, so beginning of _mysql.c now looks like:

      if defined(_WIN32) || defined(_WIN64) || defined(WIN32) || defined(WIN32) || defined(MS_WIN32)

      include <winsock2.h>

      include <windows.h>

      include <config-win.h>.

      Additionally I changed setup_windows.py and there I replaced two lines that get library path from registry with one when that path is hardcoded:

      #serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key'])
      #mysql_root, dummy = _winreg.QueryValueEx(serverKey,'Location')
      mysql_root = &quot;C:\\Projects\\Misc\\mysql-python\\mysql-5.1.31-win32&quot;
      

      Better way will be to get this value form site.cfg. So we could change setup_windows to check if mysql_root exists inside options. If exist that it should be used to build library path for mysql if doues not exist registry key should be used as currently implemented.

      Best regards

       
    • Vladislav Vaintroub

      There is a thing that puzzles me in last years a lot.
      Why people do such complicated preprocessor tweaking

      if defined(_WIN32) || defined(_WIN64) || defined(WIN32) || defined(WIN32) || defined(MS_WIN32)

      when just ifdef(_WIN32) would always suffice?

       
    • EPC Tech

      EPC Tech - 2009-03-24

      Thanks for the update bobrock! Great to have you as a lifesaver in the win32 dev world :)

       
  • Anonymous - 2010-01-26

    Why would I need MySQL installed if I am accessing a remotely hosted MySQL
    server???

    Also is there any update on a windows MSI for Py2.6 yet ??? easy_install
    failes and I have having the same problem as kalyanbe.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks