LoginSignup
21
19

More than 5 years have passed since last update.

Python - psycopg2のインストール

Last updated at Posted at 2015-09-17

Pythonからpostgresに接続するためにpsycopg2をインストールしようとした時につまずいたのでメモ

環境

  • OS... Ubuntu14.04
  • Python... Python 3.2.3

インストールコマンド

sudo pip install psycopg2

エラーメッセージ

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-47ldcn/psycopg2

対応

以下のパッケージが不足していたようなのでインストール

sudo apt-get install -y python3-dev
sudo apt-get install -y libpq-dev

再度インストールしたらうまく動作しました

※参考

21
19
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
21
19