|
Building
Building pyodbc
OverviewObtaining SourceThe source for released versions are provided in zip files on the Downloads page. If you are going to work on pyodbc (changes are welcome!), use the git repository on github. (Even better, create a fork on github so I can easily pull changes from your fork.) If you want an unreleased version from github but don't have git installed, choose the branch and commit you want and use the download button. It will offer you a tar or zip file. Compilingpyodbc is built using distutils, which comes with Python. If you have the appropriate C++ compiler installed, run the following in the pyodbc source directory: python setup.py build To install after a successful build: python setup.py install Versionpyodbc uses git tags in the format major.minor.patch for versioning. If the commit being built has a tag, such as "2.1.1", then that is used for the version. If the commit is not tagged, then it is assumed that the commit is a beta for an upcoming release. The patch number is incremented, such as "2.1.2", and the number of commits since the previous release is appended: 2.1.2-beta3. If you are building from inside a git repository, the build script will automatically determine the correct version from the tags (using git describe). If you downloaded the source as a zip from the Downloads page, the version will be in a PGK-INFO text file. The build script will read the version from the text file. If the version cannot be determined for some reason, you will see a warning about this and the script will build version 2.1.0. Do not distribute this version since you won't be able to track its actual version! Operating SystemsWindowsOn Windows, you will need the appropriate Microsoft Visual C++ compiler. To build Python 2.4 or 2.5 versions, you will need the Visual Studio 2003 .NET compiler. Unfortunately there is no free version of this. For Python 2.6 and above, you can use the free Visual Studio Express C++ compiler. You can create a Windows installer using: python setup.py bdist_wininst OtherTo build on other operating systems, use the gcc compiler. On Linux, pyodbc is typically built using the unixODBC headers, so you will need unixODBC and its headers installed. On a RedHat/CentOS/Fedora box, this means you would need to install unixODBC-devel: yum install unixODBC-devel |
Sign in to add a comment
If compiling for Ubuntu (and possibly other flavors of Linux) you'll need the unixODBC-dev package.
sudo apt-get install unixODBC-dev
Hi,
Sorry I did not find any way to contact you hence adding a comment here. I have an application which was developed in Python 2.3 and now they want to add MS SQL Server support to it. I was searching for the connection on windows when I came across this project. But I am not finding any installer for Python 2.3. Can you please let me know how can I connect to MS SQL Server using Python 2.3
You can contact me at natraj.kadur@gmail.com
You might want to try the Google group here: http://groups.google.com/group/pyodbc
To avoid gcc error on Ubuntu Linux, I did:
I also installed the following 2 packages from Synaptic:
To avoid 'no default driver specified' error when connecting to MSSQL db, I had to create /etc/odbcinst.ini and put the following entry:
Source: http://www.mail-archive.com/sqlalchemy@googlegroups.com/msg08435.html