Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



12 Commits

Repository files navigation


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


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+
Python 2.6
pip install git+
Python 2.7
pip install git+
Python 3.2
pip install git+
Python 3.3
pip install git+
Python 3.4
pip install git+

Windows 64 bit

Python 2.6
pip install git+
Python 2.7
pip install git+
Python 3.2
pip install git+
Python 3.3
pip install git+
Python 3.4
pip install git+


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


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



Same as Psycopg2


Pip & virtualenv friendly version of psycopg2 for Windows






No packages published