Wanna learn how to this? keep reading.

Set up a Shell Python Development Environment From Scratch — Part 2

Python, Working with VirtualEnvironments

Ennio Maldonado
Jan 21 · 5 min read

Table of contents

❯ python --version
❯ python — version
Python 3.9.1
❯ curl https://pyenv.run | bash
❯ exec $SHELL
❯ pyenv versions
system
❯ sudo apt-get update; sudo apt-get install --no-install-recommends make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
❯ pyenv install -v 3.5.0
❯ pyenv install -l
Available versions:
2.1.3
2.2.3
2.3.7
2.4.0
2.4.1
...
Etc
❯ pyenv virtualenv 3.5.0 myvenv
❯ pyenv versions
system
3.5.0
3.5.0/envs/myvenv
myvenv
❯ pyenv local myvenv
❯ pip install pip-tools
❯ vim requirements.in
numpy
pandas
seaborn
tensorflow
keras
❯ pip-compile requirements.in
❯ pip-sync
Demo of the full process

The Startup

Get smarter at building your thing. Join The Startup’s +787K followers.

Sign up for Top 10 Stories

By The Startup

Get smarter at building your thing. Subscribe to receive The Startup's top 10 most read stories — delivered straight into your inbox, once a week. Take a look.

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

The Startup

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +787K followers.

Ennio Maldonado

Written by

Ennio is a curiosity driven and taco’s eating engineer. Originally from mexico and currently living in sunny Barcelona, he enjoys science and technology.

The Startup

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +787K followers.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface.

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox.

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic.

Get the Medium app