21

I'm looking for binary eggs with psycopg2's binaries for Windows but can't find any.
On http://initd.org/psycopg/download/ there's only source package and link to Windows port of Psycopg which provides binary installers but no binary eggs.

The reason I'm looking for binary egg is I'd like to install psycopg in virtualenv and it's not (this answer describes why it usually is possible) possible with standard Windows installers which look for installed Python in the registry.

Side note: I guess psycopg is rather popular library and it strikes me as odd not to provide binary eggs for download on project's page. Am I missing something here?

Community
  • 1
  • 1
Piotr Dobrogost
  • 41,292
  • 40
  • 236
  • 366

4 Answers4

51

We just use something like easy_install http://www.stickpeople.com/projects/python/win-psycopg/psycopg2-2.4.win32-pyx.x-pg9.0.3-release.exe from within the virtual environment.

Seems to work; we end up with psycopg2 in the virtual environment and not in the base environment, which I take to be the endgame here.

UPD: List of available realeases available on stickpeople.com site

joni jones
  • 2,865
  • 3
  • 23
  • 28
ig0774
  • 39,669
  • 3
  • 55
  • 57
  • it installs the 64x version!! even when you specify 32x – siamii Mar 14 '13 at 00:25
  • @siamii It installs the executable you give it. If you're having trouble, I would recommend downloading the version you want first instead of using the URL. Then just give it the file path instead of the URL. – jpmc26 Jul 22 '13 at 23:26
  • 3
    The mentioned link is no longer up. See here for psycopg2 installers: http://www.lfd.uci.edu/~gohlke/pythonlibs/#psycopg – Dustin Wyatt Feb 22 '14 at 22:01
  • @DustinWyatt Thanks! Successfully installed psycopg2 into Python's venv using `easy_install c:\Downloads\psycopg2-2.5.2.win-amd64-py3.3.exe`. Also binaries are available at http://www.stickpeople.com/projects/python/win-psycopg/ – George Sovetov Apr 12 '14 at 10:19
  • 4
    There is a pip package on github (disclaimer, I put it together). Just do: `pip install git+https://github.com/nwcell/psycopg2-windows.git@win32-py25#egg=psycopg2` You can see the full docs at https://github.com/nwcell/psycopg2-windows – InsanelyADHD May 29 '14 at 21:24
  • 1
    @DustinWyatt The mentioned link is definitely still up: http://www.stickpeople.com/projects/python/win-psycopg/. It's just that you have to replace "x.x" with the actual Python version. – jpmc26 Oct 02 '14 at 23:10
  • @jpmc26 It comes and goes. When I saw your comment the site was down. A bit later it was up. A bit later it was down. It's up right now. – Dustin Wyatt Oct 05 '14 at 15:53
  • I'll just point out that the linked site is the *official* Windows binary, i.e. the one linked from the psycopg FAQ. Christoph Gohlke's repacking, however, is excellent, albeit less directly useable via pip or easy_install. – ig0774 Oct 06 '14 at 20:39
  • The site is down. – alelom Oct 10 '21 at 14:06
3

Google for "psycopg2 windows" will give you this with the first hit:

http://stickpeople.com/projects/python/win-psycopg/

Repackaging the .exe files is documented here:

Installing psycopg2 (postgresql) in virtualenv on windows

Apart from that: contact the pyscopg2 maintainers and ask to provide windows binaries.

(Dupe)

Community
  • 1
  • 1
  • Repacking after installation should be fairly trivial. –  Mar 21 '11 at 20:04
  • If by *repacking* you mean extracting contents of the package and copying it manually then they do it **without** any installation not after. Am I missing something? – Piotr Dobrogost Mar 21 '11 at 21:44
2

For the new guys stumbling upon, stickpeople have these great new pip options on github: http://www.stickpeople.com/projects/python/win-psycopg/ or https://github.com/nwcell/psycopg2-windows

keni
  • 1,730
  • 13
  • 19
0

The stickpeople website is down and the exe is no longer available, i have the psycopg2 for python 2.7 and amd64 arch that works for me, you can download it here: psycopg2-2.5.4.win-amd64-py2.7 20 281 29.exe.

reco
  • 3
  • 1
  • 3