pyenv / pyenv-installer

This tool is used to install `pyenv` and friends.
MIT License
3.96k stars 428 forks source link

Need an one line command to install pyenv #151

Closed John24y closed 10 months ago

John24y commented 10 months ago

When I setup pyenv in docker envirument, it seems not beautiful to have many lines to install pyenv in Dockerfile, is there a simple on line command to do that? and why not use a package manager like apt-get / yum?

​I would be grateful if somebody could improve that.

John24y commented 10 months ago

I find update-alternatives is what I need, is can switch global major python version simply:

use python2:

 update-alternatives --install /usr/bin/python python /usr/bin/python2 1

use python3:

 update-alternatives --install /usr/bin/python python /usr/bin/python3 1