Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip does not reset terminal in its original settings on error #9309

Open
liar666 opened this issue Dec 17, 2020 · 0 comments
Open

pip does not reset terminal in its original settings on error #9309

liar666 opened this issue Dec 17, 2020 · 0 comments

Comments

@liar666
Copy link

liar666 commented Dec 17, 2020

Environment

  • pip version: pip 20.0.2
  • Python version: Python 3.8.5
  • OS: Linux Mint 20
  • xfce4-terminal: 0.8.9.1

Description

When I update my all my python packages, using a technique like the one in [2], I often encounter the "Memory error" [1]. Mostly due to the installation of the (laaaaarge) Torch package.

[1] https://stackoverflow.com/questions/29466663/memory-error-while-using-pip-install-matplotlib#31526029
[2] https://stackoverflow.com/questions/2720014/how-to-upgrade-all-python-packages-with-pip/3452888#3452888

When this error occurs, I loose the cursor in my terminal (and other small terminal configurations). I need to reset the terminal.

Expected behavior
Even on error, my terminal should be reset to its original configuration (no cursor loss).

How to Reproduce

  • (Use a memory limited machine/VM ?)
  • Create a venv
  • Install an old version of torch in the venv
  • Update all packages with `pip freeze | cut -d "=" -f1 | xargs -n1 pip install --upgrade

Output

  • Get the 'memory error'
  • Observe that the cursor in the terminal disappears
  • Use reset to recover your terminal configuration
jaraco pushed a commit to jaraco/pip that referenced this issue Dec 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant