pip ImportError: cannot import name 'main' after update
See original GitHub issueMaintainer note: Anyone that still gets this issue please see #5599.
Environment
- pip version: ???
- Python version: 3.5.2
- OS: Linux sas-linuxmint 4.4.0-92-generic #115-Ubuntu SMP Thu Aug 10 09:04:33 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
sas@sas-linuxmint /usr/bin $ pip3 install --user --upgrade pip
Collecting pip
Using cached https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl
Installing collected packages: pip
Successfully installed pip-8.1.1
You are using pip version 8.1.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
ImportError: cannot import name 'main'
sas@sas-linuxmint /usr/bin $ pip3 install --upgrade pip
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
ImportError: cannot import name 'main'
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:18 (5 by maintainers)
Top Results From Across the Web
Error after upgrading pip: cannot import name 'main'
You can resolve this issue by reinstalling pip. Use one of the following command line commands to reinstall pip:.
Read more >[SOLVED] Error after upgrading pip: cannot import name ' ...
This error mostly occurs when you have accidentally upgraded the pip in our system. · It appears when pip and unpack_url are used...
Read more >Error after upgrading pip cannot import name main
Whenever I am trying to install any package using pip, I am getting this import error: dey@niroj-notebook:~$ pip3 install numpy Traceback ...
Read more >[Solved] pip Import Error: cannot import name main
Simply speaking, this problem usually occurs when the version upgrade. Solved. First, we need to fix the "pip3" file. sudo vim /usr/bin/pip3.
Read more >Error after upgrading pip: cannot import name 'main' - Intellipaat
The reason why you are getting import errors while trying to install any package using pip is that you must have upgraded your...
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
hash -d pip
worked for meI had the same problem, but uninstall and reinstall with apt and pip didn’t work for me.
I saw another solution on stackoverflow that presents a easy way to recover pip3 path:
sudo python3 -m pip uninstall pip && sudo apt install python3-pip --reinstall