Closed j-adamczyk closed 2 years ago
Interestingly, on the next run (identical, without any changes), error changed to:
14:40:53 File "/home/jenkins/agent/workspace/_repo_name_PR-24/lib/db_connector.py", line 6, in <module>
14:40:53 import psycopg2
14:40:53 File "/usr/local/lib/python3.9/site-packages/psycopg2/__init__.py", line 51, in <module>
14:40:53 from psycopg2._psycopg import ( # noqa
14:40:53 ImportError: Error loading shared library libresolv.so.2: No such file or directory (needed by /usr/local/lib/python3.9/site-packages/psycopg2/../psycopg2_binary.libs/libgssapi_krb5-497db0c6.so.2.2)
I realized that the error was connected to this one, not to the aws-psycopg2
.
I am installing
aws-psycopg2
using Poetry:The generated
requirements.txt
hasaws-psycopg2==1.3.8
.Everythings works locally on a fresh environment, PyCharm detects everything and I checked on disk and everything is there. However, on Jenkins it does not work. Relevant Jenkinsfile.groovy part:
I just do
pip install -r requirements.txt
there and then I get:Curiously, everything works when deployed on AWS. Do you have any idea why this may be happening? Or if this may be the case for this library, or just my Jenkins setup?