jenkinsci / pyenv-pipeline-plugin

Execute commands in Python virtualenvs in Jenkins Pipeline DSL
https://plugins.jenkins.io/pyenv-pipeline/
MIT License
33 stars 15 forks source link

Unable to start virtualenv - fails when downloading setup tools pip wheel #27

Closed amuresia closed 5 years ago

amuresia commented 6 years ago

When executing the following command in Jenkins : python3 -m virtualenv --python=python3 /home/jenkins/workspace/test-job/.pyenv-python3 the job hangs and then fails eventually.

`TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'

...Installing setuptools, pkg_resources, pip, wheel...done. Traceback (most recent call last): File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/lib/python3/dist-packages/virtualenv.py", line 2363, in main() File "/usr/lib/python3/dist-packages/virtualenv.py", line 719, in main symlink=options.symlink) File "/usr/lib/python3/dist-packages/virtualenv.py", line 988, in create_environment download=download, File "/usr/lib/python3/dist-packages/virtualenv.py", line 918, in install_wheel call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT) File "/usr/lib/python3/dist-packages/virtualenv.py", line 812, in call_subprocess % (cmd_desc, proc.returncode)) OSError: Command /home/jenkins/worksp...-python3/bin/python3 - setuptools pkg_resources pip wheel failed with error code 2`

I have no problem executing the same command manually by SSH-ing to the jenkins slave and there are no errors - the virtual environment is created successfully (see below)

user@host:~/workspace$ python3 -m virtualenv --python=python3 /home/jenkins/workspace/test-job/.pyenv-python3 Already using interpreter /usr/bin/python3 Using base prefix '/usr' New python executable in /home/jenkins/workspace/test-job/.pyenv-python3/bin/python3 Also creating executable in /home/jenkins/workspace/test-job/.pyenv-python3/bin/python Installing setuptools, pkg_resources, pip, wheel...done.

I tried setting LC_ALL = "en_US.UTF-8" and LC_CTYPE = "en_US.UTF-8" My proxies are also set in the environment block of the Jenkins pipeline.

The full error available in the logs is: ``

cstarner commented 5 years ago

The full error logs didn't post, would you mind submitting them?

cstarner commented 5 years ago

Closing due to inactivity. If you can provide more in depth logs, I'm happy to investigate further