GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — `pip 26.1.1` not functional in venv (no attribute `sys.addaudithook`) · Issue #7956 · RustPython/RustPython

pip 26.1.1 not functional in venv (no attribute sys.addaudithook) #7956

New issue
Copy link
New issue
Copy link
Closed
#7860
Closed
pip 26.1.1 not functional in venv (no attribute sys.addaudithook)#7956
#7860
Copy link
Labels
C-bugSomething isn't workingSomething isn't working

Description

@vytas7
vytas7
opened on May 23, 2026
Issue body actions

Summary

If I create a rustpython venv, and then upgrade pip, it can no longer install anything.
It works itself to, e.g., print its version:

$ pip install -U pip
<...>
Successfully installed pip-26.1.1
$ pip -V
pip 26.1.1 from <tmp>/rustpython3.14t/site-packages/pip (python 3.14)

Note: I am running

Python 3.14.0.alpha (heads/master:f3b83efce, May 22 2026, 13:11:57)
[RustPython 0.5.0 with rustc 1.95.0 (59807616e 2026-04-14)]

Expected

I can pip install stuff.

Actual

I can no longer pip install stuff:

$ pip install falcon
Requirement already satisfied: falcon in ./rustvenv/lib/rustpython3.14t/site-packages (4.2.0)
ERROR: Exception:
Traceback (most recent call last):
  File "/tmp/rustvenv/lib/rustpython3.14t/site-packages/pip/_internal/cli/base_command.py", line 109, in _run_wrapper
    status = _inner_run()
  File "/tmp/rustvenv/lib/rustpython3.14t/site-packages/pip/_internal/cli/base_command.py", line 102, in _inner_run
    return self.run(options, args)
           ~~~~~~~~^^^^^^^^^^^^^^^
  File "/tmp/rustvenv/lib/rustpython3.14t/site-packages/pip/_internal/cli/req_command.py", line 101, in wrapper
    return func(self, options, args)
  File "/tmp/rustvenv/lib/rustpython3.14t/site-packages/pip/_internal/commands/install.py", line 554, in run
    _prevent_further_imports()
    ~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/tmp/rustvenv/lib/rustpython3.14t/site-packages/pip/_internal/commands/install.py", line 131, in _prevent_further_imports
    sys.addaudithook(_prevent_import_hook)
    ^^^
AttributeError: module 'sys' has no attribute 'addaudithook'

Activity

  1. vytas7
    added
    C-bugSomething isn't workingSomething isn't working
    on May 23, 2026
  2. ShaharNaveh commented on May 23, 2026

    @ShaharNaveh
    ShaharNaveh
    on May 23, 2026
    Contributor
    More actions

    Related to: #7860


    We do not support pip>=26.1.1 yet, and I'm not sure about how can we show a warning, to notify the users about this in the meantime until we have a fix

    cc: @youknowone

  3. vytas7 commented on May 23, 2026

    @vytas7
    vytas7
    on May 23, 2026
    Author
    More actions

    Thanks for feedback @ShaharNaveh!

    On consideration, this issue could probably be distilled to an unsupported stdlib function, sys.addaudithook (added in CPython 3.8).

    $ rustpython -c "import sys; sys.addaudithook"
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
        import sys; sys.addaudithook
                    ^^^
    AttributeError: module 'sys' has no attribute 'addaudithook'
    

    (This snippet passes on all other recent implementations, including PyPy and GraalPy.)

    Reacted by Shahar Naveh
  4. vytas7
    changed the title [-]Upgraded `pip` not functional in venv (no attribute `'addaudithook'`)[/-] [+]Upgraded `pip` not functional in venv (no attribute `sys.addaudithook`)[/+] on May 23, 2026
  5. ShaharNaveh
    changed the title [-]Upgraded `pip` not functional in venv (no attribute `sys.addaudithook`)[/-] [+]`pip 26.1.1` not functional in venv (no attribute `sys.addaudithook`)[/+] on May 23, 2026
  6. youknowone
    closed this as completedin #7860on May 26, 2026
  7. jayvdb commented on Jun 16, 2026

    @jayvdb
    jayvdb
    on Jun 16, 2026
    More actions

    fwiw, pip 26.0.1 is the last release before that hook was added.
    Introduced in pip's commit pypa/pip@fb01b1830 on 2026-04-14, shipped in 26.1

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

    C-bugSomething isn't workingSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.