简体   繁体   中英

Python3.9 Django Docker Postgres

I'm trying to update my docker image switching from python:3.8.2-alpine3.10 to python:3.9.0-alpine3.12 , but I'm getting an issue when running django commands SSL_check_private_key: symbol not found .

I get the following error when running checks:

bash -c "touch /var/donor_reporting_portal/.touch && django-admin check --deploy " /usr/local/lib/python3.9/site-packages/environ/environ.py:628: UserWarning: /usr/local/lib/python3.9/site-packages/donor_reporting_portal/config/.env doesn't exist - if you're not configuring your environment separately, create one. Traceback (most recent call last): File "/usr/local/bin/django-admin", line 8, in sys.exit(execute_from_command_line()) File "/usr/local/lib/python3.9/site-packages/django/core/management/ init .py", line 401, in execute_from_command_line File "/usr/local/lib/python3.9/site-packages/django/core/management/ init .py", line 377, in execute File "/usr/local/lib/python3.9/site-packages/django/ init .py", line 24, in setup File "/usr/local/lib/python3.9/site-packages/django/apps/registry.py", line 91, in populate File "/usr/local/lib/python3.9/site-packages/django/apps/config.py", line 116, in create File "/usr/local/lib/python3.9/importlib/ init .py", line 127, in import_module File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 790, in exec_module File "", line 228, in _call_with_frames_removed File "/usr/local/lib/python3.9/site-packages/django/contrib/postgres/apps.py", line 1, in File "/usr/local/lib/python3.9/site-packages/psycopg2/ init .py", line 51, in ImportError: Error relocating /usr/local/lib/python3.9/site-packages/psycopg2/_psycopg.cpython-39-x86_64-linux-gnu.so: SSL_check_private_key: symbol not found make[2]: *** [.run] Error 1 make[1]: *** [test] Error 2 make: *** [build] Error 2

I don't get any issue when running this on my machine.

Postgres functionality relies on a binary that is not portable and generally must be compiled on the target system and version of Python. Psycopg2 is built and released for every version of Python, but the 3.9 version of psycopg2 has not yet been released.

So, as of today, Psycopg2 on Python 3.9 is not yet supported .

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM