when installing psycopg2 in my Django project
pip install psycopg2==2.7.*
I get this error :
psycopg/psycopgmodule.c:689:18: error: incomplete definition of type 'struct _is'
I tried the answer to the following question: Is there any problem installing psycopg2 in virtualenv on MacOS catalina with PostgreSQL 12.1 installed? but I still get the same error
安装psycopg2-binary
对我psycopg2-binary
。
If you are using Python 3.8.x then the support for the same was added in psycopg2 2.8.x. I faced the same problem but worked out fine once I switched to python 3.7.x
Installing PostgreSQL fixed it for me, but the error was not exactly the same. Anyways, give it a try:
brew install postgresql
Cheers
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.