Skip to content
This repository has been archived by the owner on Dec 23, 2020. It is now read-only.

mac 安装时候报错。 #19

Open
ning1022 opened this issue Aug 7, 2017 · 2 comments
Open

mac 安装时候报错。 #19

ning1022 opened this issue Aug 7, 2017 · 2 comments

Comments

@ning1022
Copy link

ning1022 commented Aug 7, 2017

Collecting psycopg2==2.6.2 (from -r requirements.txt (line 8))
  Using cached psycopg2-2.6.2.tar.gz
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info/psycopg2.egg-info
    writing pip-egg-info/psycopg2.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
    writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
    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'.

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/1k/_yh_dpzn721401tdqztp_qb40000gn/T/pip-build-aBbk2v/psycopg2/

怎么解决呢?

@the-c0d3r
Copy link

You have to use sudo to install. That is permission error.

@moonD4rk
Copy link

安装最新版本的 psycopg2 即可。

requirments.txt 中的 psycopg2==2.6.2 改为 psycopg2

然后执行 pip install -r requirements.txt 即可。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants