Pip & virtualenv friendly version of psycopg2 for Windows
Python C Other
Latest commit 5698844 Jun 5, 2014 @nwcell Update README.md
Permalink
Failed to load latest commit information.
psycopg2 win64-py34-psycopg2-253 May 29, 2014
src 'iniializing' Mar 20, 2014
tests Adding test suite Mar 28, 2014
.gitignore Adding test suite Mar 28, 2014
README.md Update README.md Jun 5, 2014
setup.py 'iniializing' Mar 20, 2014

README.md

psycopg2-windows

Pip, windows, AND virtualenv friendly versions of psycopg2!!!!! This works because everything is pre-compiled and beautiful.

Cool Stuff
  • Easy installation of psycopg2 on windows
  • Pip install works for windows
  • Virtualenv friendly
  • No .exe to wrangle with

Why

Every time I need to set up psycopg2 on windows, I wind up wanting to shoot something. For years, I've been managing my virtualenv with Jason Erickson's awesome set of pre-compiled libraries. Recently, I decided to quit making my like so difficult and just pipify everything for windows.

Installation Scripts

Depending on your environment, you'll want to use the appropriate script. All branches are using version 2.5.3 of psycopg2. Since psycopg2 is for PostgreSQL, you'll obviousely want to have that installed first.

Windows 32 bit

Python 2.5
pip install git+https://github.com/nwcell/psycopg2-windows.git@win32-py25#egg=psycopg2
Python 2.6
pip install git+https://github.com/nwcell/psycopg2-windows.git@win32-py26#egg=psycopg2
Python 2.7
pip install git+https://github.com/nwcell/psycopg2-windows.git@win32-py27#egg=psycopg2
Python 3.2
pip install git+https://github.com/nwcell/psycopg2-windows.git@win32-py32#egg=psycopg2
Python 3.3
pip install git+https://github.com/nwcell/psycopg2-windows.git@win32-py33#egg=psycopg2
Python 3.4
pip install git+https://github.com/nwcell/psycopg2-windows.git@win32-py34#egg=psycopg2

Windows 64 bit

Python 2.6
pip install git+https://github.com/nwcell/psycopg2-windows.git@win64-py26#egg=psycopg2
Python 2.7
pip install git+https://github.com/nwcell/psycopg2-windows.git@win64-py27#egg=psycopg2
Python 3.2
pip install git+https://github.com/nwcell/psycopg2-windows.git@win64-py32#egg=psycopg2
Python 3.3
pip install git+https://github.com/nwcell/psycopg2-windows.git@win64-py33#egg=psycopg2
Python 3.4
pip install git+https://github.com/nwcell/psycopg2-windows.git@win64-py34#egg=psycopg2

Versions

If you want to specify your version, you may do so by installing by tag instead of branch. The naming convention is identical to branches, except you append the psycopg2 version (eg. @win32-py25-psycopg2-253). The following psycopg2 versions are available:

  • 2.5.2
  • 2.5.3

Tests

I've built a primitive test suite that builds python python virtual enviroments and then pip installs psycopg2. Pip becomes difficult to install starting with python 2.6 and I can't find MSI installs for 2.5. Because of this, I've not fully tested either of those python versions. That said, I've put together a .bat file that builds 32 and 63 bit virtualenvs for pythons 2.7, 3.2, and 3.3. It then installs psycopg2 into each virtualenv. To keep testing easy, I've included python installations in the tests folder. I realize that this is not very space sensitive, so the test directory is only in the master branch. Since each compiled version of psycopg2 is kept in a separate branch, installing via pip will not download 6 python installations.

If you do want to run the tests themselves, simply clone/checkout master and run tests\scrapt.bat. From there you may read the scripts output and also check each virtualenv to ensure that the psycopg2 was installed successfully. If you wan't to help out and have a different environment, please help with the tests. If you want to help expand the test suite, feel free to help and/or ask any questions.

The test suite assumes that you have a primary python installation with virtualenv already installed.

Successfully tested with virtualenv on Windows 7 64 bit:
  • Windows 32 bit: Python 2.7
  • Windows 32 bit: Python 3.2
  • Windows 32 bit: Python 3.3
  • Windows 64 bit: Python 2.7
  • Windows 64 bit: Python 3.2
  • Windows 64 bit: Python 3.3

Credits

Liscense

Same as Psycopg2