pyenv-tool

Pyenv Setup
Pyenv Setup

Pyenv tool is used to install, manage and switch between different python versions easily.
Automates the manual editing of changing paths and system properties.
Homepage: Pyenv



1. Pyenv project homepage
Homepage: https://github.com/pyenv/pyenv

2. Installation: easy way to install
$ curl https://pyenv.run | bash
Default installation folder
~/.pyenv

3. Check the pyenv commands
$ pyenv
options has to be popout.

4. Try to install any python version
$ pyenv install 3.7.13

5. If any error by lising below names, then install below plugins
$ sudo apt install build-essential 
libbz2-dev
libreadline-dev
libsqlite3-dev
curl
llvm
libncursesw5-dev
xz-utils
tk-dev
libxml2-dev
libxmlsec1-dev
libffi-dev
liblzma-dev
zlib1g-dev
libssl-dev

6. Reluanch terminial and type pyenv versions - to list all python versions installed
in the system
* 3.7.13 (set by /home/mkm/.pyenv/version)

7. Set python version
pyenv global 3.7.13
eval "$(pyenv init --path)"

8. Relaunch terminal and check the python version
$ python3 --version
Python 3.7.13

Note: this version change is limited to the terminal lifetime
Automate this version change by adding below to bashrc file
$ gedit .bashrc
eval "$(pyenv init --path)"
exit and relaunch terminal and check python version.
It sets automatically to the global version of pyenv

Compiled on TUESDAY, 06-AUGUST-2024, 12:47:47 AM IST

Comments

Popular posts from this blog

hadoop-installation-ubuntu

jenv-tool

hive-installation-in-ubuntu