Skip to content Skip to sidebar Skip to footer

Setting Up A Specific Python In Jenkins

I am quite new with configuring Jenkins or Python but I have to set up a unitary test in Jenkins. My program is in Python, but only works on Python 2.6 whereas the Jenkins version

Solution 1:

If you want your program to run with a specific version of the python interpreter, you indicate it in the shebang

#!/usr/bin/python2.6#your code here

Solution 2:

What i did in my Jenkins shell script using a specific python version was something like this when calling my unit test:

python3 src/test/unit_test.py

I was using it to use Python 3.X but it should work with 2.6 as well using:

python2.6 src/test/unit_test.py

Post a Comment for "Setting Up A Specific Python In Jenkins"