Basically, you can install pyenv by following guideline: “Ubuntu Workstation Copy-Paste install”
http://amaral-lab.org/resources/guides/pyenv-tutorial
After the installation, you can list all the installed python versions by the following command:
$ pyenv versions
If you want to install a Python version which is not equal to the version installed in your desktop, you should first check all the available versions.
$ pyenv install --list
Then, you can install a version chosen from the list.
$ pyenv install 3.4.3
But during the installation, you might face with several build problems like:
Installing Python-3.4.3... WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib? WARNING: The Python readline extension was not compiled. Missing the GNU readline lib? ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib? Please consult to the Wiki page to fix the problem. https://github.com/yyuu/pyenv/wiki/Common-build-problems BUILD FAILED (Ubuntu 15.04 using python-build 20150601-11-g36c5cbf) Inspect or clean up the working tree at /tmp/python-build.20150709085352.14078 Results logged to /tmp/python-build.20150709085352.14078.log Last 10 log lines: (cd /home/bjlee/.pyenv/versions/3.4.3/share/man/man1; ln -s python3.4.1 python3.1) if test "xupgrade" != "xno" ; then \ case upgrade in \ upgrade) ensurepip="--upgrade" ;; \ install|*) ensurepip="" ;; \ esac; \ ./python -E -m ensurepip \ $ensurepip --root=/ ; \ fi Ignoring ensurepip failure: pip 6.0.8 requires SSL/TLS
In that case, you should install missing packages.
$sudo apt-get install libssl-dev libsqlite3-dev libreadlines-dev libbz2-dev