Skip to content

Instantly share code, notes, and snippets.

@bnguyensn
Last active February 22, 2020 11:52
Show Gist options
  • Save bnguyensn/be30a9dfe6a6d6ffe74a3544318288e2 to your computer and use it in GitHub Desktop.
Save bnguyensn/be30a9dfe6a6d6ffe74a3544318288e2 to your computer and use it in GitHub Desktop.
Python project notes

Creating a Python project

This contains notes on creating Python projects

pip

pip comes with Python.

Useful commands:

  • pip list: list all globally installed packages
  • pip freeze: list locally installed packages. This can be used to compile a requirements.txt by doing pip freeze > requirements.txt.

virtualenv

Installation

pip install virtualenv

Usage

Create a new virtual environment called venv:

virtualenv venv

Activate the created virtual environment

Unix:

source venv/bin/activate

Windows:

venv\Scripts\activate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment