builtin input crashes during pip uninstall in virtual environment in win/git-bash when running pip uninstall mypackage crashes with: "input(): lost sys.stderr" #2456
This only happens while in a virtual environment while in git-bash and possibly cygwin, but doesn't happen in cmd or in powershell. The crash happens while trying to do a pip uninstall mypackage while inside the virtual environment.
Issue
This only happens while in a virtual environment while in
git-bash
and possiblycygwin
, but doesn't happen incmd
or inpowershell
. The crash happens while trying to do apip uninstall mypackage
while inside the virtual environment.Expected behavior: No crash
See related bug report: https://github.com/python/cpython/issues/99937
And pip workaround: https://github.com/pypa/pip/pull/11630/files/4654a57a20ea36f3754e945bfe28f5e3581a0186
Repro steps
Sure here are the repro steps for another, simpler github repo:
git-bash
git clone https://github.com/zackees/keyvalue_sqlite
cd keyvalue_sqlite
python make_venv.py
activate.sh
pip install .
ERROR STEP:
pip uninstall keyvalue_sqlite`, error message: "input(): lost sys.stderr"Environment
pip list
OS:![image](https://user-images.githubusercontent.com/6856673/205172131-a578a0df-9242-4048-9556-198939d096ae.png)
pip list
of the host python wherevirtualenv
is installed:Output of the virtual environment creation
Make sure to run the creation with
-vvv --with-traceback
: