Installing psycopg2 into virtualenv when PostgreSQL is not installed on development system

前端 未结 14 1136
一向
一向 2020-12-04 09:24

Is it possible to install psycopg2 into a virtualenv when PostgreSQL isn\'t installed on my development system—MacBook Pro with OS X 10.6?

When I run

14条回答
  •  [愿得一人]
    2020-12-04 09:38

    As I never needed to install postgresql database on this server I installed the following libraries on Ubuntu 14_04 version before running pip install psycopg2 on the same server

    apt-get install libpq-dev python-dev and then executed pip install psycopg2 within virtual env.

    Output Collecting psycopg2 Using cached psycopg2-2.6.1.tar.gz Building wheels for collected packages: psycopg2 Running setup.py bdist_wheel for psycopg2 Stored in directory: /root/.cache/pip/wheels/e2/9a/5e/7b620848bbc7cfb9084aafea077be11618c2b5067bd532f329 Successfully built psycopg2 Installing collected packages: psycopg2 Successfully installed psycopg2-2.6.1

提交回复
热议问题