The Real Python Podcast

Virtual Environment Structure & Surveying the Packaging Ecosystem


Listen Later

How do Python virtual environments work under the hood? How does understanding these concepts help you with managing them for your projects? This week on the show, CPython core developer Brett Cannon returns to discuss his recent articles about virtual environments and the Python packaging landscape.

Brett talks about his recent article “How Virtual Environments Work.” He was researching the topic to solve an issue with a Linux Python distribution that doesn’t provide the tools to create virtual environments. We talk about how he solved the problem by creating a tiny library named microvenv.

We also take a look at the Python packaging ecosystem. Brett talks about the early days of Python, when these tools didn’t exist. He contrasts that with the current packaging solution explosion and how each one attempts to solve unique problems. We also discuss the Python Packaging User Survey and the plans for packaging summits at PyCon US. Note that we recorded this episode two weeks before PyCon US 2023.

Course Spotlight: Getting the Most Out of the Python Standard REPL

In this video course, you’ll learn how to use the Python standard REPL (Read-Eval-Print Loop) to run your code interactively. This tool will allow you to test new ideas, explore and experiment with new tools and libraries, refactor and debug your code, try out examples, and more.

Topics:

  • 00:00:00 – Introduction
  • 00:01:58 – Virtual environments
  • 00:07:10 – PEP 704 & virtual environment workflows
  • 00:26:57 – Experimenting with not including pip
  • 00:34:44 – Video Course Spotlight
  • 00:36:35 – What are you using for packaging?
  • 00:43:32 – Python Packaging User Survey & the history of packaging
  • 00:48:40 – Packing only gets complex when it’s not pure Python code
  • 01:01:22 – Outcomes after the survey and the packaging summit
  • 01:03:56 – What are you excited about in the world of Python?
  • 01:05:28 – What’s something you want to learn next?
  • 01:07:12 – How can people follow the work that you do?
  • 01:08:14 – Thanks and goodbye
  • Show Links:

    • How virtual environments work
    • PEP 704 – Require virtual environments by default for package installers - peps.python.org
    • microvenv - PyPI
    • python-launcher: Python launcher for Unix - GitHub
    • bootstrap.pypa.io
    • Classifying Python virtual environment workflows
    • Python Packaging User Survey - Results PDF
    • Thoughts on the Python packaging ecosystem - Pradyun Gedam
    • pypa/packaging: Core utilities for Python packages - GitHub
    • Flit 3.8.0 - Flit 3.8.0 documentation
    • hatch - PyPI
    • hatchling - PyPI
    • Episode #93: Launching Python, Virtual Environments, and Locking Dependencies With Brett Cannon – The Real Python Podcast
    • PEP 665 – A file format to list Python dependencies for reproducibility of an application - peps.python.org
    • Programming Rust, 2nd Edition
    • Tall, Snarky Canadian - Brett’s Blog
    • Microsoft Python Blog
    • Visual Studio Code Blog
    • Brett Cannon (@[email protected]) - Mastodon
    • Level up your Python skills with our expert-led courses:

      • Getting the Most Out of the Python Standard REPL
      • Working With Python Virtual Environments
      • Publishing Python Packages to PyPI
      • Support the podcast & join our community of Pythonistas

        ...more
        View all episodesView all episodes
        Download on the App Store

        The Real Python PodcastBy Real Python

        • 4.7
        • 4.7
        • 4.7
        • 4.7
        • 4.7

        4.7

        136 ratings


        More shows like The Real Python Podcast

        View all
        Software Engineering Radio - the podcast for professional software developers by se-radio@computer.org

        Software Engineering Radio - the podcast for professional software developers

        272 Listeners

        The Changelog: Software Development, Open Source by Changelog Media

        The Changelog: Software Development, Open Source

        283 Listeners

        Thoughtworks Technology Podcast by Thoughtworks

        Thoughtworks Technology Podcast

        41 Listeners

        Talk Python To Me by Michael Kennedy

        Talk Python To Me

        592 Listeners

        Software Engineering Daily by Software Engineering Daily

        Software Engineering Daily

        625 Listeners

        Soft Skills Engineering by Jamison Dance and Dave Smith

        Soft Skills Engineering

        269 Listeners

        Super Data Science: ML & AI Podcast with Jon Krohn by Jon Krohn

        Super Data Science: ML & AI Podcast with Jon Krohn

        296 Listeners

        Python Bytes by Michael Kennedy and Brian Okken

        Python Bytes

        213 Listeners

        Data Engineering Podcast by Tobias Macey

        Data Engineering Podcast

        142 Listeners

        Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

        Syntax - Tasty Web Development Treats

        983 Listeners

        DataFramed by DataCamp

        DataFramed

        266 Listeners

        Kubernetes Podcast from Google by Abdel Sghiouar, Kaslin Fields

        Kubernetes Podcast from Google

        181 Listeners

        Practical AI by Practical AI LLC

        Practical AI

        189 Listeners

        The Stack Overflow Podcast by The Stack Overflow Podcast

        The Stack Overflow Podcast

        64 Listeners

        The Pragmatic Engineer by Gergely Orosz

        The Pragmatic Engineer

        52 Listeners