Open Porkepix opened 4 years ago
Can you show me the error output?
Sure, here are the relevant parts of some tests I did :
[Pipeline] // stage
[Pipeline] withEnv
[Pipeline] {
[Pipeline] ansiColor
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Create virtualenv and install dependencies)
[Pipeline] sh
+ which python3
/usr/bin/python3
[Pipeline] withPythonEnv
[Pipeline] {
[Pipeline] sh
+ which python3
/var/lib/jenkins/workspace/foo/.pyenv-usr-bin-python3/bin/python3
The first which is within a withPythonEnv('python3') {
and hit the system python, the second one is within a withPythonEnv('/usr/bin/python3') {
.
I could notice the issue as I was trying to do some pip install -r requirements.txt
and there is no pip as system command, only within virtualenvironments, and so I just got errors like command not found.
Ran into this as well here. Took a long time to figure out what was going on since it silently fails to activate the environment.
We needed some times figuring it out, documentation shows that we can use the plugin this way:
So wishing to do the same, but by forcing the use of python 3 as the above example would hit python 2, I used
But while the binary is correctly here and python3 command exist and poinbt to
/usr/bin/python3
, it caused errors and fails.Calling the below example would however works.
python3
should be enough and not fail, nor require user to provide the full path to the binary.