Skip to content

venv module creates unexpected symlink with non-ASCII name (𝜋thon) #155595

Closed as not planned

Description

@BrianKimurgor

Bug report

Bug description:

venv.EnvBuilder.setup_python() in Lib/venv/__init__.py includes a symlink
suffix that uses a Unicode mathematical italic pi character instead of the
letter "p":

suffixes.append('𝜋thon')

As a result, every virtual environment created with python3 -m venv gets an
extra symlink named 𝜋thon (U+1D745 MATHEMATICAL ITALIC SMALL PI + "thon"),
pointing at the real python3 binary, alongside the normal python /
python3 / python3.X symlinks.

Minimal reproduction:

​```python

no Python code needed — reproduces from the shell:

python3 -m venv testenv

ls -la testenv/bin/ | grep -P '[^\x00-\x7F]'

-> shows: 𝜋thon -> python3

​```

Expected: only the standard ASCII-named symlinks (python, python3,
python3.X) should be created in a venv's bin/ directory.

Confirmed this originates from the venv module itself, not from pip or any
post-install step — it appears in a freshly created venv before any packages
are installed.

CPython versions tested on:

3.14

Operating systems tested on:

Linux

Activity

  1. added
    type-bug
    on Aug 11, 2026
  2. gvanrossum commented on Aug 11, 2026

    @gvanrossum
    Member

    You don't describe any actual harm from this. It's clearly an easter egg -- what's wrong with that?

  3. added
    pending
    on Aug 12, 2026
  4. StanFromIreland commented on Aug 12, 2026

    @StanFromIreland
    Member

    It seems LLMs don’t get the pun :-/

  5. BrianKimurgor commented on Aug 12, 2026

    @BrianKimurgor
    Author

    my apologies, I just got stuck while learning machine learning, I spun up jupyter notebook in vscode as an extension, then on trying to create a virtual environment I got stuck, sorry.

  6. noboruatkek commented on Sep 17, 2026

    @noboruatkek

    In one of my environment, this "an easter egg " results just this: Image

    it suspend emacs for a while searching glyph for 'MATHEMATICAL ITALIC SMALL PI' without any success. It is a just waste of time. How about use 'GREEK SMALL LETTER PI', instead.

  7. picnixz commented on Sep 20, 2026

    @picnixz
    Member

    I think this is a reason enough to change this or even drop it. I like easter eggs but only in video games and I believe we are actually harming people more than necessary.

    How long does the hang take though?

    cc @hugovk

  8. StanFromIreland commented on Sep 20, 2026

    @StanFromIreland
    Member

    For reference, we have already gated it in some cases, as it broke on filesystems that didn't support the character: 91d71ac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pendingtype-bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions