Python Part 1: Virtual Environments
Installing pip
When working with a Python project, it is possible to work with different versions. We don't want to work in the same global version of Python for every project. As a solution we use pipenv to manage both the packages and the virtual environments.
Before we can use pipenv, we have to make sure pip is installed. Most of the time pip comes pre-installed with most versions of Python, but if not you'll have to download a version of pip. To install pip on a linux machine:
$ sudo apt install python3-pip # command for Python 3
$ sudo apt install python-pip # command for Python 2 Installing pipenv
To install pipenv globally:
pip install pipenv Creating and activating an environment
To initialize an environment in your project directory:
pipenv install
pipenv shell