diff --git a/doc/install_pipenv.md b/doc/install_pipenv.md index 680e592346d34332b78d2660fb63e8fcaaf969f1..153e31c39cad74a7f7ca97afd41956a684a471f1 100644 --- a/doc/install_pipenv.md +++ b/doc/install_pipenv.md @@ -20,3 +20,40 @@ pipenv install pipenv shell ./silkaj ``` + +## Manage Python versions with Pyenv + +If you have trouble with the pipenv install, may be the Python version installed on your system is not up to date. +To install and manage easily multiple Python version, use Pyenv: + +### Install pyenv on your home +```bash +curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash +``` + +Add in `~/.bash_profile`, in `~/.bashrc` on Fedora or Ubuntu: + +```bash +export PATH="$HOME/.pyenv/bin:$PATH" +eval "$(pyenv virtualenv-init -)" +eval "$(pyenv init -)" +export PYENV_ROOT="$HOME/.pyenv" +``` + +Reload your bash config: + + source ~/.bashrc + +or + + source ~/.bash_profile + +### Install Python version required + + pyenv install 3.6.0 + +### Select Python version for the current shell + + pyenv shell 3.6.0 + +Pipenv will search the `Pyenv` Python version chosen before the system version.