How to install pyenv on Ubuntu

sudo apt-get update; 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-devinstaller liblzma-dev
curl | bash
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
eval "$(pyenv init -)"
source ~/.bashrc
pyenv install 3.6.9
pyenv global 3.6.9
pyenv local 3.6.9




Software Engineer at Identv

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to save yourself from building an admin panel

Admin panel solution.

Rack awareness in Kafka Streams

“Secret” use of annotations in Python!

Scraping Flipkart product data with Python and Beautiful Soup

This is a title!


How to commit entire directories to GitHub directly from your browser using GitHub.js

The Microsoft Access Ternary Operator

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Gaurav Panta

Gaurav Panta

Software Engineer at Identv

More from Medium

“Static” and runtime type checking for python dict at same time

Socket Programming in Python (setup the client and server)

Build Your First Pypi Package

Python module not found — Ultimate guide