Installing via pip under Win7 + virtualenv + VC++2008

From: Stephen Lacy <slacy(at)slacy(dot)com>
To: psycopg(at)postgresql(dot)org
Subject: Installing via pip under Win7 + virtualenv + VC++2008
Date: 2011-06-02 23:07:04
Message-ID: BANLkTikBn8VG+srqHYJincpdgQJrt1WBPw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

Hi,

I'm trying to unify my development system (Ubuntu) with some coworkers who
are using Windows. I'm using virtualenv, and am trying to make their setup
as painless as possible.

And thus, I'd like to have them be able to install psycopg2 via pip in their
windows-based virtualenv. They have VC++ 2008 installed, Python 2.7,
setuptools, etc.

pip install psycopg2 appears to download and compile (psycopg 2.4.1) and I
get files in env/lib/site-packages/psycopg2:

06/02/2011 04:01 PM <DIR> .
06/02/2011 04:01 PM <DIR> ..
06/02/2011 04:01 PM 11,591 errorcodes.py
06/02/2011 04:01 PM 11,854 errorcodes.pyc
06/02/2011 04:01 PM 5,824 extensions.py
06/02/2011 04:01 PM 6,959 extensions.pyc
06/02/2011 04:01 PM 29,451 extras.py
06/02/2011 04:01 PM 39,454 extras.pyc
06/02/2011 04:01 PM 8,009 pool.py
06/02/2011 04:01 PM 9,262 pool.pyc
06/02/2011 04:01 PM 3,206 psycopg1.py
06/02/2011 04:01 PM 3,647 psycopg1.pyc
06/02/2011 04:01 PM <DIR> tests
06/02/2011 04:01 PM 3,610 tz.py
06/02/2011 04:01 PM 4,159 tz.pyc
06/02/2011 04:01 PM 133,120 _psycopg.pyd
06/02/2011 04:01 PM 3,612 __init__.py
06/02/2011 04:01 PM 2,738 __init__.pyc
15 File(s) 276,496 bytes
3 Dir(s) 94,301,532,160 bytes free

But, when running python, I get this:

Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)]
on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import psycopg2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "psycopg2\__init__.py", line 71, in <module>
from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
ImportError: DLL load failed: The specified module could not be found.
>>>

Any debugging help would be greatly appreciated. I know I can install
win-psycopg2, but I'd rather just get the pip install working for everyone,
since it automates the install in a scriptable way.

Steve

Responses

Browse psycopg by date

  From Date Subject
Next Message Joe Abbate 2011-06-03 00:48:04 Re: Installing via pip under Win7 + virtualenv + VC++2008
Previous Message Federico Di Gregorio 2011-06-01 12:28:49 Re: Negative Integers Escaping