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

        134 ratings


        More shows like The Real Python Podcast

        View all
        Hanselminutes with Scott Hanselman by Scott Hanselman

        Hanselminutes with Scott Hanselman

        377 Listeners

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

        Software Engineering Radio - the podcast for professional software developers

        265 Listeners

        The Changelog: Software Development, Open Source by Changelog Media

        The Changelog: Software Development, Open Source

        287 Listeners

        LINUX Unplugged by Jupiter Broadcasting

        LINUX Unplugged

        262 Listeners

        Thoughtworks Technology Podcast by Thoughtworks

        Thoughtworks Technology Podcast

        41 Listeners

        Talk Python To Me by Michael Kennedy

        Talk Python To Me

        585 Listeners

        Software Engineering Daily by Software Engineering Daily

        Software Engineering Daily

        628 Listeners

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

        Super Data Science: ML & AI Podcast with Jon Krohn

        295 Listeners

        Python Bytes by Michael Kennedy and Brian Okken

        Python Bytes

        213 Listeners

        Data Engineering Podcast by Tobias Macey

        Data Engineering Podcast

        140 Listeners

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

        Syntax - Tasty Web Development Treats

        987 Listeners

        CoRecursive: Coding Stories by Adam Gordon Bell - Software Developer

        CoRecursive: Coding Stories

        186 Listeners

        DataFramed by DataCamp

        DataFramed

        269 Listeners

        Practical AI by Practical AI LLC

        Practical AI

        190 Listeners

        The Stack Overflow Podcast by The Stack Overflow Podcast

        The Stack Overflow Podcast

        63 Listeners