How to install python 3.x alongside with 2.y without root privileges

10,352

You can install pyenv with the pyenv installer script and then run pyenv install 2.7.14 and pyenv install 3.6.3.

Some more documentation is here

Share:
10,352
José Angel Neria Pérez
Author by

José Angel Neria Pérez

Updated on June 28, 2022

Comments

  • José Angel Neria Pérez
    José Angel Neria Pérez almost 2 years

    I'm working in a shared machine with no root privileges, but Python 2.y installed, but I would like to have both flavors of Python, also I would like to call Python 2.y just typing python (as usual) and for calling Python 3.x, type python3. I understand that this is possible because in my main equipment (whit root access, and the magic of sudo) I can "select" which one to use.

  • CristiFati
    CristiFati over 6 years
    This doesn't answer the question. In order to use VEnv, Python must be installed.
  • Guilherme Salomé
    Guilherme Salomé over 5 years
    If you are following the Basic GitHub Checkout, then on Step 4 restarting the shell with exec "$SHELL" may not work depending on how the machine you are connected to is setup. Simply disconnecting from the ssh session and connecting back makes it work, and then you can use pyenv install. For example, pyenv install 3.6.6 installs python3.6.6, then you can do pyenv global 3.6.6 and now calling python or python3 will take you to python3.6.6.