Learn Python with Talk Python's 270 hours of courses

PEP 711 - Distributing Python Binaries

Episode #412, published Wed, Apr 19, 2023, recorded Tue, Apr 18, 2023

What if we distributed CPython, the runtime, in the same way we distributed Python packages - as prebuilt binary wheels that only need to be downloaded and unzipped to run? For starters, that would mean we could ship and deploy Python apps without worrying whether Python itself is available or up-to-date on the platform. Nathaniel Smith has just proposed a PEP to do just that, PEP 711. And we'll dive into that with him next.

Watch this episode on YouTube
Play on YouTube
Watch the live stream version

Episode Deep Dive

Guest introduction and background

Nathaniel Smith is a well-known Python core developer and open-source contributor. He helped create and maintain Trio, an async library built around structured concurrency principles. Over the years, Nathaniel has contributed heavily to the Python ecosystem's packaging discussions and is deeply involved in improving Python’s distribution story. Most recently, he proposed PEP 711, which aims to distribute prebuilt, ready-to-run Python interpreters as easily as regular Python packages. In addition, he is also working on “posy,” a Rust-based toolset that aims to simplify environment management and the handling of these new Python binaries.

What to Know If You're New to Python

Many of the ideas discussed here rely on installing and managing Python and its libraries. If you haven’t worked much with package managers or virtual environments, it’s helpful to know that Python typically installs packages via pip into different “environments.” Understanding basics like pip install or how Python searches for installed packages will help you follow along.

Key points and takeaways

  • 1) Introducing PEP 711 for Distributing Python Binaries PEP 711 proposes distributing Python itself as a prebuilt binary, similarly to how wheels deliver Python packages. This approach would let you “install” Python—complete with all needed libraries—by just downloading and unzipping a single file. It aims to make Python more portable, more self-contained, and less reliant on system-level constraints. This could eliminate issues like missing or outdated system interpreters, especially in container or CI environments. Because Python is crucial in so many fields, having a single standard to deliver it anywhere—just like a wheel—would be a massive win for both new and experienced developers.
  • 2) Why Self-Contained Python Installations Matter Many Python developers have struggled with environment collisions and system-wide installs. Self-contained Python distributions let you avoid interfering with system Python or forcing operating-system-level upgrades. The conversation highlighted that having a portable interpreter means fewer conflicts in user environments, especially when you’re juggling multiple Python projects. It also simplifies onboarding, giving beginners or team members a direct, isolated Python environment without manual configuration. Ultimately, this leads to more reliable deployments, since everything is reproducible and consistent.
  • 3) posy: A Rust-based Tool for Python Environments Nathaniel is also developing “posy,” a command-line tool that fetches and configures these new Python binaries. Rather than running on top of Python like pip, posy is written in Rust, which provides benefits for speed, concurrency, and distribution as a single binary. It can download the right interpreter for your project, unpack only the necessary components, and help you keep multiple versions side by side. posy also aims to integrate Python package resolution in a more declarative manner—generating a lock file for your entire environment’s Python version and dependencies. While still an early-stage project, posy could become the front-end piece that brings PEP 711’s vision to life.
  • 4) Comparisons with Conda and Other Packaging Solutions Listeners may wonder: Why not just use Conda? The episode explains that Conda is excellent at bundling a full data science environment, but it’s also deeply integrated with its own ecosystem of packages and layout assumptions. PEP 711 focuses on delivering a standard binary Python that could be reused by any downstream system—Conda included. Because PyBI (the proposed binary format) is simpler and more universal, it could ultimately act as a foundational piece for many different Python delivery methods. The takeaway is that Conda and PyBI-based workflows solve different problems and can coexist without replacing each other.
  • 5) Challenges in Packaging the Entire Standard Library An interesting thread discussed whether the entire standard library could be shipped independently of the interpreter. Some even questioned if distributing smaller standard library wheels might help with updating or removing outdated modules. However, big structural changes like shipping the standard library separately would require major buy-in from the community. According to Nathaniel, the real step is to start small—just distributing the interpreter. Over time, advanced scenarios might emerge where standard library components also become more modular.
  • 6) Potential Impact on Beginners and Teaching By letting people grab a single PyBI file to run Python code, PEP 711 could significantly streamline the “getting started” story for new developers. The episode highlights how often teachers spend valuable class time dealing with environment setup, installing the correct version, and path issues. Having a prebuilt binary means drastically fewer installation steps—just unzip and run on Mac, Windows, or Linux. Additionally, educators could hand out a fully configured environment to students, lessening the friction for coding assignments and projects. This simpler route benefits experienced teams as well, by reducing overhead across large organizations.
  • 7) Python Packaging Ecosystem Evolution The podcast placed the PyBI concept in the broader context of packaging changes. Python packaging has come a long way, from the old distutils days to modern wheels, pip improvements, and advanced dependency resolvers. PEP 711 extends that same principle of consistent, universal binaries to the interpreter itself. This could unify how we share not only Python packages but the entire Python runtime. In effect, PyBI plus tools like posy represent a new generation of solutions aiming to give the developer more control and fewer headaches.
  • 8) Performance and Efficiency Gains with Rust Implementing an installer in Rust (like posy) comes with tangible benefits for Python packaging. Rust binaries start up quickly, handle parallel tasks well, and let you distribute a single executable that’s independent of a Python interpreter. This addresses issues around startup overhead for large Python programs that do significant amounts of importing. For example, by using Rust’s concurrency, posy can rapidly unpack multiple wheels or Python binaries in parallel. While Python itself remains an excellent language, the conversation underscores how Rust can complement Python in packaging or tooling scenarios.
  • 9) posy’s Approach to Declarative Environments One of the novel aspects of posy is its declarative concept for locking and environment creation. Instead of repeatedly modifying a single environment in place, posy can build new environments from a “lock file” that has pinned versions for Python and each dependency. This approach feels more like Docker’s reproducible containers, but with far less overhead than bundling a whole OS layer. Reproducibility and clarity become the default, reducing confusion for both local development and automated CI pipelines. While still evolving, this direction holds a lot of promise for Python’s future developer workflows.
    • Links and Tools:
  • 10) Real-World Use Cases and Future Outlook Nathaniel described potential immediate benefits for open source projects, letting maintainers easily distribute “ready-to-run” development environments to newcomers. He also mentioned how organizations dealing with legacy or locked-down systems could instantly upgrade to the latest Python by just unzipping a PyBI. The conversation touched on expansions like cross-compiling, shipping stripped-down embedded Pythons, or even bridging further with specialized tools (e.g., PyInstaller, PyOxidizer). If the community embraces PEP 711, the entire Python ecosystem could see faster innovation around environment management, distribution, and user onboarding. Overall, the future looks bright if these ideas move forward and become widely adopted.

Interesting quotes and stories

  • “The entire idea is basically: Like wheels, but the wheel *is* Python itself.” – Nathaniel Smith, summarizing the abstract of PEP 711 in one sentence.
  • “If you have a single file you can just unzip—your problems around system Python vanish.” – A highlight about how PyBIs could revolutionize day-one experience for new or non-Python developers.
  • “Tools like posy can truly turn Python inside out. Instead of ‘pip install Python’, we’re controlling Python from the *outside*.” – On how a Rust-based approach might shift the packaging mindset.

Key definitions and terms

  • PEP 711 (Python Enhancement Proposal 711): A draft proposal to distribute CPython as a portable binary (PyBI) that can be treated similarly to Python wheels.
  • PyBI: A potential new file format that packages a prebuilt Python interpreter in a single zip archive.
  • posy: A Rust-based command-line tool designed to fetch and manage PyBIs, while also providing dependency resolution and lock-file-based environment generation.
  • Structured Concurrency: A programming model promoted by Nathaniel in the Trio library, ensuring tasks are systematically started and torn down, improving reliability and safety for async code.
  • Wheels: The modern standard for distributing binary Python packages. They are .whl files that can be quickly installed without requiring local compilation.

Learning resources

  • Modern Python Projects: Discover best practices in Python packaging, project structure, and how to handle multi-environment setups.
  • Python 3.11: A Guided Tour Through Code: Stay up to date with the newest Python features and improvements—especially helpful if you’re curious about next-gen distribution.

Overall takeaway

Python’s packaging ecosystem continues to evolve to meet developers’ needs, and Nathaniel Smith’s PEP 711 shows how distributing the interpreter like a library could transform the user experience. Tools such as posy illustrate how Rust and Python can harmonize, delivering high-performance, low-overhead management layers. The goal is simpler onboarding for new users and more powerful distribution options for seasoned developers. By aligning Python’s own runtime distribution with modern packaging practices, the community can eliminate many of the installation, environment, and versioning hassles we’ve long faced. If these ideas move forward, they could usher in a new era of flexibility and freedom for anyone building or deploying Python applications.

Links from the show

Nathaniel: @njs@mastodon.social
[announce] Pybi and Posy: discuss.python.org
PEP 711: peps.python.org
Py2App: readthedocs.io
PyInstaller: pyinstaller.org
py-spy: github.com
Anthropic: anthropic.com
Trio: github.com
Trio on Talk Python: talkpython.fm
Zip Documentary: The Dark History of Zip Files: youtube.com
Watch this episode on YouTube: youtube.com
Episode transcripts: talkpython.fm

--- Stay in touch with us ---
Subscribe to Talk Python on YouTube: youtube.com
Talk Python on Bluesky: @talkpython.fm at bsky.app
Talk Python on Mastodon: talkpython
Michael on Bluesky: @mkennedy.codes at bsky.app
Michael on Mastodon: mkennedy

Talk Python's Mastodon Michael Kennedy's Mastodon