Skip to content

Instantly share code, notes, and snippets.

@jmvrbanac
Created December 11, 2013 23:42
Show Gist options
  • Save jmvrbanac/7920633 to your computer and use it in GitHub Desktop.
Save jmvrbanac/7920633 to your computer and use it in GitHub Desktop.
Using pyenv virtualenvs in a Jenkins Job
#!/bin/bash
set +x
# Setup all of the pyenvs
export PATH="$HOME/.pyenv/bin:$PATH"
export CONFIGURE_OPTS='--enable-shared'
eval "$(pyenv init -)"
pyenv shell 2.7.5
pyenv virtualenvwrapper
pyenv rehash
# Make virtualenv
mkvirtualenv my_env
@ivan-bilan
Copy link

This is working great, especially when running pyenv from Jenkins.

@rezamt
Copy link

rezamt commented May 11, 2021

eval "$(pyenv init -)" is not working anymore.

use instead:

eval "$(pyenv init --path)

Thanks
Rez

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment