The Real Python Podcast

Launching Python, Virtual Environments, and Locking Dependencies With Brett Cannon


Listen Later

Would you like a simple command to launch your Python programs using the newest version of the language installed on your machine? This week on the show, we continue our conversation with Brett Cannon. Brett discusses his project, the Python Launcher for Unix.

We dive into Brett’s workflow to set up projects, virtual environments, and prepare for distribution. He shares some of the tools he employs and reasons for keeping things simple.

We also talk about PEP 665, which specifies a file format to list an application’s Python package installation requirements. Brett shares why he co-authored the PEP and a bit of the community’s reaction. It leads to a deeper conversation about going beyond ‘requirements.txt’ to lock files.

Course Spotlight: Data Visualization Interfaces in Python With Dash

In this course, you’ll learn how to build a dashboard using Python and Dash. Dash is a framework for building data visualization interfaces. It helps data scientists build fully interactive web applications quickly.

Topics:

  • 00:00:00 – Introduction
  • 00:01:43 – Python Launcher for Unix
  • 00:09:36 – Hiding a virtual environment directory
  • 00:13:30 – Sponsor: Scout APM
  • 00:14:17 – Environment managers and being an editor vs an IDE person
  • 00:17:32 – PEP 665, lock files, and Brett’s dependency workflow
  • 00:20:56 – The hurdles of source distributions and version control repositories
  • 00:25:07 – Drawbacks of requirements files and standardizing lock files
  • 00:28:19 – Why PEP 665 is controversial and the changes to setuptools
  • 00:33:48 – Video Course Spotlight
  • 00:35:16 – Are these examples of growing pains?
  • 00:37:51 – Unfair comparisons to packaging in Rust or other languages
  • 00:42:35 – What are you excited about in the world of Python?
  • 00:43:54 – What do you want to learn next?
  • 00:49:23 – Thanks and goodbye
  • Show Links:

    • Introducing the Python Launcher for Unix
    • brettcannon/python-launcher: Python launcher for Unix
    • Python Extension for VSCode
    • Why use Flit? — Flit 3.5.1 documentation
    • pip-tools: A set of tools to keep your pinned Python dependencies fresh.
    • PEP 665 – A file format to list Python dependencies for reproducibility of an application | Python.org
    • venv — Creation of virtual environments — Python 3.10.1 documentation
    • virtualenvwrapper · PyPI
    • pdm - Python Development Master · PyPI
    • pyflow - Streamlines working with Python projects and files · PyPI
    • pipenv · PyPI
    • Thoughts on where tools fit into a workflow
    • What to do when you botch a release on PyPI
    • Python Virtual Environments: A Primer – Real Python
    • Why you shouldn’t invoke setup.py directly | Paul Ganssle
    • python-wasm: Build scripts and configuration for building CPython for Emscripten
    • Pyodide — A Python distribution for the browser and Node.js based on WebAssembly
    • WebAssembly
    • Programming Rust, 2nd Edition
    • Brett Cannon on Twitter: “PEP 665 got rejected today 😞”
    • Level up your Python skills with our expert-led courses:

      • A Beginner's Guide to pip
      • Data Visualization Interfaces in Python With Dash
      • Working With Pipenv
      • 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

        139 ratings


        More shows like The Real Python Podcast

        View all
        Software Engineering Radio by se-radio@computer.org

        Software Engineering Radio

        271 Listeners

        The Changelog: Software Development, Open Source by Changelog Media

        The Changelog: Software Development, Open Source

        289 Listeners

        Software Engineering Daily by Software Engineering Daily

        Software Engineering Daily

        624 Listeners

        Talk Python To Me by Michael Kennedy

        Talk Python To Me

        585 Listeners

        Soft Skills Engineering by Jamison Dance and Dave Smith

        Soft Skills Engineering

        288 Listeners

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

        Super Data Science: ML & AI Podcast with Jon Krohn

        302 Listeners

        Python Bytes by Michael Kennedy and Brian Okken

        Python Bytes

        215 Listeners

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

        Syntax - Tasty Web Development Treats

        987 Listeners

        REWORK by 37signals

        REWORK

        210 Listeners

        CoRecursive: Coding Stories by Adam Gordon Bell - Software Developer

        CoRecursive: Coding Stories

        190 Listeners

        DataFramed by DataCamp

        DataFramed

        269 Listeners

        Practical AI by Practical AI LLC

        Practical AI

        210 Listeners

        AWS Podcast by Amazon Web Services

        AWS Podcast

        203 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

        64 Listeners