Work in a Virtual Environment (pipenv)

Introduction

Pipenv is a tool that provides all necessary means to create a virtual environment for your Python project. It automatically manages project packages through the Pipfile file as you install or uninstall packages. Pipenv also generates the Pipfile.

Why Use Pipenv to Create a Python Environment?

Install pipenv

pip install pipenv

Run pipenv Shell

pipenv shell

links

pipenv

Basic Usage of Pipenv

How to Use pipenv for Python Virtual Environments (YouTube)

Using Pipenv to manage Python virtual environments and packages (YouTube)
Steps from YouTube Video

  1. python -m pip install pipenv

  2. Create a new project
    1. cd C:\users\Me\Desktop
    2. mkdir new-project
    3. cd new-project
    4. dir (empty folder)
    5. python -m pipenv --python 3.8
    6. dir (pipenv file created)
  3. python -m pip list
  4. python -m dirpipenv shell
  5. pipenv install pyglet=1.5.5
  6. pipenv install -d black=19.1808
  7. pipenv graph

Choosing the Right Python Environment Tool for Your Next Project (Published March 2023)