---
# System prepended metadata

title: Python Virtual Environment Setup

---

# Python Virtual Environment Setup
## Prerequisites
* Setup [pyenv](https://hackmd.io/uJyoipjQQJu2xlzz94f4hw)
* Set global pyenv version to 3.7.3

## Install virtualenv

```console
pip install virtualenv
```

## Create a new virtual environment

```console
virtualenv venv
```

## Activate your virtual environment

```console
source venv/bin/activate
pip install <dependencies go here>
```

## Export your dependencies

```console
pip freeze > requirements.txt
```

## Import your dependencies

```console
pip install -r requirements.txt
```