You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pip 26.1.1 not functional in venv (no attribute sys.addaudithook) #7956
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'
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
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
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
Activity
ShaharNaveh commentedon May 23, 2026
Related to: #7860
We do not support
pip>=26.1.1yet, 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 fixcc: @youknowone
vytas7 commentedon May 23, 2026
Thanks for feedback @ShaharNaveh!
On consideration, this issue could probably be distilled to an unsupported stdlib function,
sys.addaudithook(added in CPython 3.8).(This snippet passes on all other recent implementations, including PyPy and GraalPy.)
[-]Upgraded `pip` not functional in venv (no attribute `'addaudithook'`)[/-][+]Upgraded `pip` not functional in venv (no attribute `sys.addaudithook`)[/+][-]Upgraded `pip` not functional in venv (no attribute `sys.addaudithook`)[/-][+]`pip 26.1.1` not functional in venv (no attribute `sys.addaudithook`)[/+]jayvdb commentedon Jun 16, 2026
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