On 10/4/23 05:09, paulrubin37@gmail.com wrote:
Ok first I tried the force reinstall, that changed nothing.
(venv) mailman@mail:~> pip install --force-reinstall psycopg2-binary\<2.9 Collecting psycopg2-binary<2.9 Using cached psycopg2_binary-2.8.6-cp311-cp311-linux_x86_64.whl
You are forcing the version to be <2.9 which is why your venvs have 2.8.6.
Note you are installing a cached version. That may be why it's broken.
You could try
pip install --no-cache-dir --force-reinstall psycopg2-binary\<2.9
or as I note below, if your Django is >=3.1
pip install --no-cache-dir -U psycopg2-binary
...
Here is what is in the file that is failing, If I read this right I need to check every single sub import.
50 51 from psycopg2._psycopg import ( # noqa 52 BINARY, NUMBER, STRING, DATETIME, ROWID, 53 54 Binary, Date, Time, Timestamp, 55 DateFromTicks, TimeFromTicks, TimestampFromTicks, 56 57 Error, Warning, DataError, DatabaseError, ProgrammingError, IntegrityError, 58 InterfaceError, InternalError, NotSupportedError, OperationalError, 59 60 _connect, apilevel, threadsafety, paramstyle, 61 __version__, __libpq_version__, 62 ) 63
This is way too much detail. This psycopg2-binary is broken. You can't successfully import psycopg2 from it. You need to get a working psycopg2 installed rather than trying to fix your broken one.
What is your Django version? The only reason for pinning psycopg2-binary<2.9 is for Django<3.1. See https://docs.mailman3.org/en/latest/install/virtualenv.html#installing-mailm.... If your Django is >=3.1 try in your venv
pip install -U psycopg2-binary
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan