Skip to content

Latest commit

 

History

History
49 lines (37 loc) · 895 Bytes

Install-pyenv-on-Ubuntu-21.10.md

File metadata and controls

49 lines (37 loc) · 895 Bytes

Install pyenv on Ubuntu 21.10

Install dependencies

manlix@lab:~$ sudo apt-get update
manlix@lab:~$ sudo apt-get install make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev git

Install pyenv

manlix@lab:~$ curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash

Edit ~/.profile

Add these lines above all lines:

export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"

Edit ~/.bashrc

Add this line to the end:

eval "$(pyenv init -)"

Apply changes

manlix@lab:~$ . ~/.bashrc

Check pyenv

manlix@lab:~$ pyenv --version
pyenv 2.2.0

Based on https://github.com/pyenv/pyenv/wiki