Perhaps you have have a bunch of staging or testing systems with different python version and you have to switch between different systems to test your written code with different python version.
Or you tried to use multiple python version parallel installed, lets say on a older os.
That a really mess!
pyenv lets you easily switch between multiple versions of Python.
In each project directory can be used a different python version, which has no conflicts with the global installation.
Install pyenv with required dependencies:
zypper install --type pattern devel_basis
zypper in pyenv openssl-devel readline-devel
Add to ~/.bash_profile , or ~/.bashr depending on your shell or operating system:
eval "$(pyenv init -)"
Lets, say you have a project directory project_on_3.5,
which contains a code which is only runable with python 3.5.6:
mkdir project_on_3.5 && cd project_on_3.5
pyenv install 3.5.6
pyenv local 3.5.6
With pyenv, you can have unlimited python version on a single system instance.
Leave a Reply