Skip to main content Brad's PyNotes

Posts on Packages

  1. Tutorial: Venv

    TL;DR

    Virtual environments create isolated Python installations to prevent package conflicts between projects using python -m venv.

    Interesting!

    Virtual environments solve the “dependency hell” problem - you can have different versions of the same library for different projects without conflicts!

  2. Tutorial: Organizing and Reusing Code with Python Modules

    TL;DR

    Python modules are files containing Python code that can be imported and reused, organized into packages (directories with init.py), with various import styles (import, from…import, as) and special attributes like name and all.