Install psycopg2 in Virtualenv on Ubuntu ¶
January 13, 2011
0 comments
Jan
13
It seems every time I setup a new machine I hit the same snag installing psycopg2 into a virtualenv via pip. It's not well documented online. After a bunch of failed searching with my Google foo I found a solution. In short, you can get around the issues using build-dep. Thanks Eliot!
>> sudo apt-get build-dep python-psycopg2
>> virtualenv --no-site-packages myenv
>> source myenv/bin/activate
>> pip install psycopg2
Seems pretty obvious, I don't know why I always forget.