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
Author by
José Angel Neria Pérez
Updated on June 28, 2022Comments
-
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 over 6 yearsThis doesn't answer the question. In order to use VEnv, Python must be installed.
-
Guilherme Salomé over 5 yearsIf you are following the
Basic GitHub Checkout
, then on Step 4 restarting the shell withexec "$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 usepyenv install
. For example,pyenv install 3.6.6
installs python3.6.6, then you can dopyenv global 3.6.6
and now callingpython
orpython3
will take you to python3.6.6.