Error on import psycopg2

已查看 2,976 次
跳至第一个未读帖子

Maryam Yousaf

未读,
2021年9月15日 12:10:082021/9/15
收件人 Django users
Hello,

I need psycopg2 for postgres database in django. While installing it, I am getting below error. I tried everything on internet but it still there. Kindly help me out.

Error:
"File "/Users/maryam.yousaf/Documents/venv/lib/python3.8/site-packages/psycopg2/__init__.py", line 51, in <module>
    from psycopg2._psycopg import (                     # noqa
ImportError: dlopen(/Users/maryam.yousaf/Documents/venv/lib/python3.8/site-packages/psycopg2/_psycopg.cpython-38-darwin.so, 2): Symbol not found: _PQbackendPID
  Referenced from: /Users/maryam.yousaf/Documents/venv/lib/python3.8/site-packages/psycopg2/_psycopg.cpython-38-darwin.so
  Expected in: flat namespace
 in /Users/maryam.yousaf/Documents/venv/lib/python3.8/site-packages/psycopg2/_psycopg.cpython-38-darwin.so"

Regards,
Maryam.



This email and any files transmitted with it contain confidential information and/or privileged or personal advice. This email is intended for the addressee(s) stated above only. If you are not the addressee of the email please do not copy or forward it or otherwise use it or any part of it in any form whatsoever. If you have received this email in error please notify the sender and remove the e-mail from your system. Thank you.

This is an email from the company Just Eat Takeaway.com N.V., a public limited liability company with corporate seat in Amsterdam, the Netherlands, and address at Oosterdoksstraat 80, 1011 DK Amsterdam, registered with the Dutch Chamber of Commerce with number 08142836 and where the context requires, includes its subsidiaries and associated undertakings.

Kasper Laudrup

未读,
2021年9月15日 13:15:432021/9/15
收件人 django...@googlegroups.com
On 15/09/2021 16.40, 'Maryam Yousaf' via Django users wrote:
> Hello,
>
> I need psycopg2 for postgres database in django. While installing it, I
> am getting below error. I tried everything on internet but it still
> there. Kindly help me out.
>

Did you try this:

https://stackoverflow.com/questions/65059310/apple-m1-install-psycopg2-package-symbol-not-found-pqbackendpid

I don't know much about MacOSX, but I would assume you have an
unsupported version of Postgres installed.

Kind regards,

Kasper Laudrup
OpenPGP_0xE5D9CAC64AAA55EB.asc
OpenPGP_signature

FIRDOUS BHAT

未读,
2021年9月15日 13:36:232021/9/15
收件人 django...@googlegroups.com
Try installing this package,

pip install psycopg2-binary

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d667e7fa-57a7-ee16-0390-6834e0f0f006%40stacktrace.dk.

Vinay Bagare

未读,
2021年9月17日 12:47:272021/9/17
收件人 django...@googlegroups.com
Try

>> psycopg2-binary

Best,
Vinay Bagare

Sent from my iPhone

> On Sep 15, 2021, at 12:15 PM, Kasper Laudrup <lau...@stacktrace.dk> wrote:
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d667e7fa-57a7-ee16-0390-6834e0f0f006%40stacktrace.dk.
> <OpenPGP_0xE5D9CAC64AAA55EB.asc>

Maryam Yousaf

未读,
2021年9月17日 13:28:182021/9/17
收件人 django...@googlegroups.com
Thank you all. It was resolved by making new virtual environment and installing it again 

Aashish Kumar

未读,
2021年9月17日 14:18:282021/9/17
收件人 django...@googlegroups.com
install this package 👇

pip install psycopg2-binary

It works perfectly 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

Felix Orinda

未读,
2021年9月19日 08:46:372021/9/19
收件人 django...@googlegroups.com
pip install psycopg2-binary
Should work for you. Give me feedback on whether it has worked or not

回复全部
回复作者
转发
0 个新帖子