安装psycopg2时出错:找不到pg_config可执行文件

时间:2016-04-04 09:16:41

标签: python django postgresql amazon-web-services rds

我想将我的Django应用程序连接到Amazon RDS for PostgreSQL数据库。

  1. 我是否需要安装psycopg2? (我想是的)
  2. 如何以不需要整个postgres数据库安装的方式安装pyscopg2。
  3. 现在安装psycopg2时出错:

    Error: pg_config executable not found.
    
    Please add the directory containing pg_config to the PATH
    or specify the full executable path with the option:
    
        python setup.py build_ext --pg-config /path/to/pg_config build ...
    
    or with the pg_config option in 'setup.cfg'.
    

    我在CentOS7上。

    我试过了:

    $ yum install postgresql-libs
    $ yum install python-psycopg2
    

    安装了这些软件包,但在尝试pip install pyscopg2之后仍然遇到同样的错误。

0 个答案:

没有答案