pip install --upgrade pip breaks pip, still
See original GitHub issueEnvironment
- pip version: 10
- Python version: 2.7.12
- OS: Ubuntu 16.04
Description
I ran “pip install --upgrade pip”
now pip breaks, every time:
[J]~/bin >pip --version Traceback (most recent call last): File “/usr/bin/pip”, line 9, in <module> from pip import main ImportError: cannot import name main
I tried “sudo apt remove python-pip” and a full autoremove, and re-installed pip, and it’s still broken
Another ticket, from April 16 is now closed, relates to the same error message https://github.com/pypa/pip/issues/5240
How do we downgrade or fix this?
Expected behavior
How to Reproduce
- Get package from ‘…’
- Then run ‘…’
- An error occurs.
Output
Paste the output of the steps above, including the commands themselves and
pip's output/traceback etc.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Pip broken after upgrade. Cannot unsinstall ... - Stack Overflow
1 You are using pip version 8.1.1, however version 22.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command....
Read more >How to upgrade your pip package to the latest version
Pip is a useful tool for managing and installing python packages. Here's how to upgrade it on various operating systems.
Read more >How to Update All Python Packages - ActiveState
Update all Python Packages on Windows · Open a command shell by typing 'powershell' in the Search Box of the Task bar ·...
Read more >How to Upgrade Pip on Mac, Windows, and Linux - AppDividend
To upgrade pip on mac, you can use the sudo pip install --upgrade pip command. You can also upgrade Python to get the...
Read more >How To Use Pip (Simple Guide To Install, Update, Uninstall ...
Redistributors typically remove the ensurepip module from the Python install. If you are using a modified version of Python, you can install pip...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You probably don’t have the directory where the new pip is installed in your PATH. I think one of Ubuntu/Debian patches to pip is to install to
/usr/local
per default (when run as root, and without--user
). Do you have a pip in/usr/local/bin
?This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.