Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

psycopg2 2.9.8 not working with Python 3.12.0 #104830

Closed
uri-rodberg opened this issue May 24, 2023 · 5 comments
Closed

psycopg2 2.9.8 not working with Python 3.12.0 #104830

uri-rodberg opened this issue May 24, 2023 · 5 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@uri-rodberg
Copy link

Bug report

A clear and concise description of what the bug is.
Include a minimal, reproducible example (https://stackoverflow.com/help/minimal-reproducible-example), if possible.

I tried Python 3.12.0b1 (beta) and I ran tests of Speedy Net but it didn't work. I got this exception:
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 or psycopg module

My pip freeze --all:
asgiref==3.6.0
boto3==1.26.138
botocore==1.29.138
crispy-bootstrap4==2022.1
Django==4.2.1
django-admin-inline-paginator==0.3.0
django-crispy-forms==2.0
django-debug-toolbar==4.1.0
django-environ==0.10.0
django-friendship==1.9.6
django-translated-fields==0.12.0
factory-boy==3.2.1
Faker==18.9.0
haversine==2.8.0
jmespath==1.0.1
Pillow==9.5.0
pip==23.1.2
psycopg2==2.9.6
pymemcache==4.0.0
python-dateutil==2.8.2
pytz==2023.3
rules==3.3
s3transfer==0.6.1
setuptools==67.4.0
six==1.16.0
sorl-thumbnail==12.9.0
sqlparse==0.4.4
typing_extensions==4.5.0
tzdata==2023.3
urllib3==1.26.15
wheel==0.40.0

The above tests work with Python 3.10.11 and Python 3.11.3.

Your environment

  • CPython versions tested on:
  • Operating system and architecture:

Please complete the following information:

OS: Windows
Psycopg version: 2.9.6
Python version: Python 3.12.0b1 (beta)
PostgreSQL version: 13
pip version: 23.1.2

Repository - https://github.com/speedy-net/speedy-net
pip install the requirements and run tests with ./run_all_tests.sh.

I also filed an issue with psycopg/psycopg2#1578 which was closed.

@uri-rodberg uri-rodberg added the type-bug An unexpected behavior, bug, or error label May 24, 2023
@sunmy2019

This comment was marked as outdated.

@uri-rodberg
Copy link
Author

Still not working with Python 3.12.0b2 - I get a pip error when installing requirements.

@uri-rodberg uri-rodberg changed the title psycopg2 2.9.6 not working with Python 3.12.0b1 psycopg2 2.9.6 not working with Python 3.12.0b1 and 3.12.0b2 Jun 8, 2023
@uri-rodberg
Copy link
Author

Still not working with Python 3.12.0rc1 and psycopg2 2.9.7 (on Windows):

django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: DLL load failed while importing _psycopg: The specified module could not be found.

@uri-rodberg uri-rodberg changed the title psycopg2 2.9.6 not working with Python 3.12.0b1 and 3.12.0b2 psycopg2 2.9.7 not working with Python 3.12.0rc1 Aug 6, 2023
@sunmy2019
Copy link
Member

pip error when installing requirements.

That's most likely not Python's fault. What's your pip error message?

Error loading psycopg2 module: DLL load failed while importing _psycopg: The specified module could not be found.

This is likely due to an improper installation of psycopg2. A correct installation should also make _psycopg available.


Closed as it is most likely not fault in Python.

If you still think it's a fault from the Python side, you should remove all extensions, and provide a minimal reproducible example.

@sunmy2019 sunmy2019 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 7, 2023
@uri-rodberg
Copy link
Author

Still not working with Python 3.12.0.

@uri-rodberg uri-rodberg changed the title psycopg2 2.9.7 not working with Python 3.12.0rc1 psycopg2 2.9.8 not working with Python 3.12.0 Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants