curved-microphone-39455
01/12/2023, 11:21 PMpsycopg2 that is not installed correctly.
I have Service A that have Library A installed with poetry add -e ../../libraries/a and this lib have the psycopg2-binary in the pyproject.toml , if I try to run poetry run python run.py which is the entrypoint of my Service A everything run perfectly, but when I do ./pants run src/services/a/run.py I get everytime... (same when I build a Docker container with ./pants package the container image is done ok but when I run it same error)
File "/home/cerberus/.cache/pants/named_caches/pex_root/venvs/s/71f9e365/venv/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py", line 811, in dbapi
import psycopg2
ModuleNotFoundError: No module named 'psycopg2'
in my BUILD file in Library A I have tested every possible combination of module_mapping and overrides to try to make it works.happy-kitchen-89482
01/13/2023, 12:34 AM./pants dependencies src/services/a/run.pycurved-microphone-39455
01/13/2023, 12:35 AMhappy-kitchen-89482
01/13/2023, 12:36 AM./pants dependencies --transitive src/services/a/run.pycurved-microphone-39455
01/13/2023, 12:37 AMhappy-kitchen-89482
01/13/2023, 12:38 AMhappy-kitchen-89482
01/13/2023, 12:39 AMcurved-microphone-39455
01/13/2023, 12:39 AMhappy-kitchen-89482
01/13/2023, 12:42 AMhappy-kitchen-89482
01/13/2023, 12:42 AMcurved-microphone-39455
01/13/2023, 12:43 AMhappy-kitchen-89482
01/13/2023, 12:43 AMpostgresql extrahappy-kitchen-89482
01/13/2023, 12:43 AMcurved-microphone-39455
01/13/2023, 12:48 AMcurved-microphone-39455
01/13/2023, 12:54 AMpoetry add 'sqlalchemy[postgresql]' in my librarycurved-microphone-39455
01/13/2023, 2:15 AMhappy-kitchen-89482
01/13/2023, 2:16 AM