Skip to main content

How to Install Python Using Pyenv

Information Regarding Pyenv

At a high level, pyenv intercepts Python commands using shim executables injected into your PATH, determines which Python version has been specified by your application, and passes your commands along to the correct Python installation.

For more information, visit the pyenv GitHub repository.

Pyenv and Python3 Installation Script

bash <(wget -qO- https://raw.githubusercontent.com/ultraseedbox/UltraSeedbox-Scripts/master/Language%20Installers/python-pip-install.sh)
  • To load the python installed using pyenv in your shell, execute the following SSH command:
source ~/.profile
  • Check which python binary you are using with the following SSH command:
which python
  • The output should be as follows: /home/your_username/.pyenv/shims/python

Uninstall Pyenv and Python installed by the Script

  • Execute the following SSH command:
rm -rf ~/.pyenv
  • Open ~/.profile for editing with the following SSH command:
nano ~/.profile
  • Remove the following lines from it:
    • export PYENV_ROOT="$HOME/.pyenv"
    • export PATH="$PYENV_ROOT/bin:$PATH"
    • eval "$(pyenv init --path)"
  • Use the key combination Ctrl + O and press Enter to save the changes.
  • Then, use the key combination Ctrl + X to exit the nano text editor.
  • Load your new ~/.profile with the following SSH command:
source ~/.profile