Get fatal error when install psycopg2

Viewed 3760

I created a virtual environment with virtualenvwrapper using Python 3.

mkvirtualenv foo -p /usr/bin/python3

I tried to do a pip install of psycopg2 and got the following error:

./psycopg/psycopg.h:30:20: fatal error: Python.h: No such file or directory

I have the most recent version of python-dev. I can successfully install psycopg2 with a virtualenv using Python 2.

What is the trick to getting it install in a virtualenv using Python 3?

2 Answers

If you using python3.4 try to install python34-devel by running this command

 sudo yum install python34-devel
Related