2016-11-01 7 views
4

OSXにpsycopg2をインストールする際に重大な問題があります。psycopg2のインストールosx 10.12 python 3.5.2 - psycopg2の構築に失敗しました

:私も私を含むエラーの数を受信excecution時に PATH=$PATH:/usr/local/Cellar/postgresql/9.5.4_1/bin/pg_config

を使用して、私のパスにはpg_configを追加した pip install psycopg2

:自作を使用してPostgresqlの9.5.4_1をインストールした後、私は私の仮想環境でpsycopg2をインストールしようとしました

ld: library not found for -lssl 


clang: error: linker command failed with exit code 1 (use -v to see invocation) 
    error: command 'clang' failed with exit status 1 

そして

Failed building wheel for psycopg2 

そして同様のエラーソース結果からビルドしようとすると

Command "/Users/*username*/.virtualenvs/report/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/private/var/folders/9p/3_wdgjzd03d6bw1p_c9rrt6c0000gp/T/pip-build-cuplxne2/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/9p/3_wdgjzd03d6bw1p_c9rrt6c0000gp/T/pip-8gbk007q-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/*username*/.virtualenvs/report/bin/../include/site/python3.5/psycopg2" failed with error code 1 in /private/var/folders/9p/3_wdgjzd03d6bw1p_c9rrt6c0000gp/T/pip-build-cuplxne2/psycopg2/ 
...

前の研究と試みたソリューション:

"Failed building wheel for psycopg2" - MacOSX using virtualenv and pip

How to install Psycopg2 for Python 3.5

How to install psycopg2 with "pip" on Python?

あなたが提供することができますどのような援助のため回の

Can't install psycopg2 with pip in virtualenv on Mac OS X 10.7

ありがとう!

+0

これは、HomebrewのOSX sierraのアップデートに関する問題であるようです。私は最終的にpython 3.5をアンインストールして再インストールし、homebrewでpostgresqlを再インストールしてからpsycopg2を再度インストールしようとすることで、この問題を修正できました。 – aegon52

答えて

0
にインストールされていないための私の方法

これはHomebrewのOSX sierraのアップデートで問題になっているようです。私は最終的にこの問題をで修正し、python 3.5をアンインストールして再インストールし、自作でとし、psycopg2をもう一度インストールしようとしました。

1

MacOSXのシエラ

がグローバルpsycopg2をインストールし、通常はグローバルパッケージとしてインストール私の場合のpsycopg2にvirtualenvの

pip3 install psycopg2 
workon my_env #i use virtualenvwrapper 
toggleglobalsitepackages #Enable global site-packages 

でそれを使用しますが、virtualenvの

+0

python3とpostgresqlを再インストールする前に、psycopg2をグローバルにインストールすることもできませんでした。今では、グローバルにインストールされているので、あなたが説明したようにvenv内でアクセスできます。ありがとう! – aegon52

1

マインはSierra 10.12.2アップデートで壊れました。コマンドラインツールとpsycopg2が正しくインストールされていることを再インストール/更新しました。

xcode-select

関連する問題