Category: Modules

Compiling MySQLdb 1.2.3 on Windows 32 and 64 – Without need the MySQL Database 5.5 installed

Hi,

If you wish the module already compiled, access here: http://blog.victorjabur.com/2011/06/08/modules-python-library-compiled-for-windows-32-and-64-unofficial-windows-binaries-for-python/

First Thing: Follow this main steps to prepare the pre-requirements for compile this module:

http://blog.victorjabur.com/2011/06/05/compiling-python-2-7-modules-on-windows-32-and-64-using-msvc-2008-express/

1 – Compiling MySQLdb 1.2.3 for Mysql 5.5 database

1.1 – You will need to download the latest version of MySQL Connector C here: http://dev.mysql.com/downloads/connector/c/

* Important: Make the download properly for your platform (32 or 64 bits).

1.2 – Make the download of MySQLdb plugin here and extract to any folder: http://sourceforge.net/projects/mysql-python/

1.3 – Edit this file (MySQL-python-1.2.3/setup_windows.py) inside of folder extracted:

At Line 7 of the file, comment the two follow lines and add another, like this:

    #serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key'])
    #mysql_root, dummy = _winreg.QueryValueEx(serverKey,'Location')
    mysql_root = ''

At Line 19, put the path to your Connector C installed:

    library_dirs = [ os.path.join(mysql_root, r'lib\opt'), 'C:\Program Files\MySQL\MySQL Connector C 6.0.2\lib\opt' ]
    libraries = [ 'kernel32', 'advapi32', 'wsock32', client ]
    include_dirs = [ os.path.join(mysql_root, r'include'), 'C:\Program Files\MySQL\MySQL Connector C 6.0.2\include' ]
    extra_compile_args = [ '/Zl' ]

Important: Specify the correct path for your platform (32 or 64 bits). Above the platform is 64 bits, to 32 bits use this path: “C:\Program Files (x86)\MySQL\MySQL Connector C 6.0.2”.

1.4 – Make the build:

python setup.py build --compiler msvc
python setup.py bdist_wininst

It’s finish.

The advantage os this technique an a comparison with others posts is:

1 – The MySQL Database is not required on machine (only the connector c)
2 – Not is necessary make the update on the windows registry:

# The Windows registry key for MySQL.
# This has to be set for Windows builds to work.
# Only change this if you have a different version.
registry_key = SOFTWARE\MySQL AB\MySQL Server 5.0

Credits and References to this post:

http://chaos.weblogs.us/archives/327
http://www.fuyun.org/2009/12/install-mysql-for-python-on-windows/

Bye,
Victor Jabur

Advertisements

Modules Python Library Compiled for Windows 32 and 64 – Unofficial Windows Binaries for Python

Unofficial Windows Binaries for Python Extension Packages

This is a list of python modules compiled for me, the intention is to create a complete list of windows modules for python, this post is always updated to extend this list. I will need your help with suggestions about wich modules will be available here and links about already existents modules on the web. The files are provided “as is” without warranty or support of any kind. The entire risk as to the quality and performance is with you. The files are unofficial (meaning: informal, unrecognized, personal, unsupported) and made available for testing and evaluation purposes only.

Do you need another module that isn’t available at this list ? Send an e-mail and request your module.
victorjabur@gmail.com

Links with more plugins on Web:

http://www.lfd.uci.edu/~gohlke/pythonlibs/

—————————————————————————————————————–
Django – Framework Webhttps://www.djangoproject.com/
Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

Django-1.3.1.win32-py2.7.exe [6.4 Mb] [Python 2.7] [32 bit] [JUN 08, 2011]
Django-1.3.1.win-amd64-py2.7.exe [6.5 Mb] [Python 2.7] [64 bit] [JUN 08, 2011]

—————————————————————————————————————–
mpi4py – Plugin MPI for Pythonhttp://mpi4py.scipy.org/http://en.wikipedia.org/wiki/Message_Passing_Interface
Message Passing Interface (MPI) is an API specification that allows processes to communicate with one another by sending and receiving messages. Besides many other applications, it is a de facto standard for parallel programs running on computer clusters and supercomputers, where the cost of accessing non-local memory is high. MPI was created since 1992 by William Gropp, Ewing Lusk and others, a first standard appeared in 1994.

mpi4py-1.2.2.win32-py2.7.exe [445 Kb] [Python 2.7] [32 bit] [JUN 08, 2011]
mpi4py-1.2.2.win-amd64-py2.7.exe [522 Kb] [Python 2.7] [64 bit] [JUN 08, 2011]

—————————————————————————————————————–
MySQLdb – Plugin Connector of Database MySQL to Pythonhttp://sourceforge.net/projects/mysql-python/
Message Passing Interface (MPI) is an API specification that allows processes to communicate with one another by sending and receiving messages. Besides many other applications, it is a de facto standard for parallel programs running on computer clusters and supercomputers, where the cost of accessing non-local memory is high. MPI was created since 1992 by William Gropp, Ewing Lusk and others, a first standard appeared in 1994.

MySQL-python-1.2.3.win32-py2.7.exe [1 Mb] [Python 2.7] [32 bit] [JUN 08, 2011]
MySQL-python-1.2.3.win-amd64-py2.7.exe [1.1 Mb] [Python 2.7] [64 bit] [JUN 08, 2011]

—————————————————————————————————————–
Paramiko – SSH2 for Pythonhttp://www.lag.net/paramiko/
Paramiko is a module for python 2.2 (or higher) that implements the SSH2 protocol for secure (encrypted and authenticated) connections to remote machines. unlike SSL (aka TLS), SSH2 protocol does not require heirarchical certificates signed by a powerful central authority. you may know SSH2 as the protocol that replaced telnet and rsh for secure access to remote shells, but the protocol also includes the ability to open arbitrary channels to remote services across the encrypted tunnel — this is how sftp works, for example. It is written entirely in python (no C or platform-dependent code) and is released under the GNU LGPL (lesser GPL).

paramiko-1.7.7.1.win32-py2.7.exe [331 Kb] [Python 2.7] [32 bit] [JUN 08, 2011]
paramiko-1.7.7.1.win-amd64-py2.7.exe [356 Kb] [Python 2.7] [64 bit] [JUN 08, 2011]

—————————————————————————————————————–
PyAMF – AMF for Pythonhttp://www.pyamf.org
PyAMF provides Action Message Format (AMF) support for Python that is compatible with the Adobe Flash Player. It includes integration with Python web frameworks like Django, Pylons, Twisted, SQLAlchemy, web2py and more.

PyAMF-0.6.1.win32-py2.7.exe [508 Kb] [Python 2.7] [32 bit] [JUN 08, 2011]
PyAMF-0.6.1.win-amd64-py2.7.exe [551 Kb] [Python 2.7] [64 bit] [JUN 08, 2011]

—————————————————————————————————————–
PyCrypto – Python Cryptography Toolkithttps://www.dlitz.net/software/pycrypto/http://sourceforge.net/projects/pycrypto/http://www.amk.ca/python/code/crypto.html
This is a collection of cryptographic algorithms and protocols, implemented for use from Python.

pycrypto-2.3.win32-py2.7.exe [545 Kb] [Python 2.7] [32 bit] [JUN 08, 2011]
pycrypto-2.3.win-amd64-py2.7.exe [572 Kb] [Python 2.7] [64 bit] [JUN 08, 2011]

—————————————————————————————————————–
PyXMLSec – PyXMLSec is a set of Python bindings for the XML Security Library.http://pyxmlsec.labs.libre-entreprise.org/

pyxmlsec-0.3.0.win32-py2.7.exe [255 Kb] [Python 2.7] [32 bit] [SET 29, 2012]
libxml2-python-2.7.7.win32-py2.7.exe (Pre-Requisite) [1.5Mb] [Python 2.7] [32 bit] [SET 29, 2012]
dll_pyxmlsec_0.3.0_py2.7.rar (Pre-Requisite Dlls - Put this on your C:\Python27) [998Kb] [Python 2.7] [32 bit] [SET 29, 2012]

—————————————————————————————————————–
PyBluez- PyBluez is an effort to create python wrappers around system Bluetooth resources to allow Python developers to easily and quickly create Bluetooth applications.http://code.google.com/p/pybluez/

PyBluez-0.18.win32-py2.7.exe [286 Kb] [Python 2.7] [32 bit] [SET 29, 2012]

—————————————————————————————————————–
DbfPy – DbfPy is a python-only module for reading and writing DBF-files. It was created by Jeff Kunce and then modified by Hans Fiby.http://dbfpy.sourceforge.net/

dbfpy-2.2.5_python_27_.win32.exe [211 Kb] [Python 2.7] [32 bit] [MAY 28, 2013]
dbfpy-2.2.5.win-python_27_amd64.exe [238 Kb] [Python 2.7] [64 bit] [MAY 28, 2013]

—————————————————————————————————————–
PyXML – PyXml is a python module to work with the Xml format. It was created on 2000 year. PyXML is no longer maintained.http://sourceforge.net/projects/pyxml/

PyXML-0.8.4.win32-py2.7.exe [1 Mb] [Python 2.7] [32 bit] [AUG 19, 2014]
PyXML-0.8.4.win-amd64-py2.7.exe [1 Mb] [Python 2.7] [64 bit] [AUG 19, 2014]

—————————————————————————————————————–

Do you need another module that isn’t available at this list ? Send an e-mail and request your module.
victorjabur@gmail.com