Answer the question
In order to leave comments, you need to log in
When running python scripts in jenkins, libraries from site-packages are not imported. How to solve the problem?
UPD: I solved the issue head-on - with symbolic links. but it's kind of like that.
I will ask to the heap: what to look / read to configure python builds (autotests) with jenkins? What is the true way?
OS: Ubuntu server 20.04
jenkins fresh.
python 3.8.5
The python script that runs in job uses the parmiko module.
pip put this package in /home/root/.local/lib/python3.8/site-packages (pip --target doesn't work for some reason)
job crashes due to
import paramiko
ModuleNotFoundError: No module named 'paramiko'
Build step 'Execute shell' marked build as failure
['', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/home/root/.local/lib/python3.8/site-packages', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages']
['/home/root/my_tests', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages']
Answer the question
In order to leave comments, you need to log in
It's best to use a virtual environment so you don't have to depend on the installation on the host.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question