-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 ImportError: cannot import name 'main' after update #5447
Comments
Same issue |
same issue |
This is the same as #5221. |
@pradyunsg Why are you marking this a duplicate of a closed issue? It's clearly not closed if it's still an issue... |
In this case, the particular issue seems to be:
The solution is to use the pip wrapper installed when you installed pip 10 in Technically the issue here is slightly different from #5221, as in that issue users were overwriting the system pip. But the root cause is the same - using an older pip wrapper (supplied by the OS) against a newer version of pip. That's not a supported scenario, and you can't encounter it with correct use of pip. So there's no pip issue, hence we close the issues when they arise. We're directing users at #5221 because that's where the bulk of the advice on how to tidy up your system after an incorrect upgrade is located. |
#5221 (comment) is what worked for me |
thang@cq-gpu:/mnt/tmp/tqdscripts/azure/nvtf$ pip3 install --user --upgrade pip This does nothing for me. Still same problem. |
Please take a look at #5599 and issues linked there. |
|
i uninstalled and reinstalled pip. seems to work. |
I 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:
|
Hi, fellows! I have the same problem and solved it. Here is my solution.
So, I cd into the file /usr/bin/ and cat pip3 to see the code in it. I see this in it:
And then I think that it was not in the installation path. So I cd into the python3-pip, like this:
And I saw this:
So, can you see the difference? I can figure out that I have to make the file the same as the file in /usr/bin/pip3 So, I copped the code in /.local/lib/python3.5/site-packages/pip to replace the code in /usr/bin/pip3 ps: pip3 or pip have no difference in this problem. |
Use pip3 👍 |
you should try using |
@linpanusst is correct sudo ln -sf $( type -P pip ) /usr/bin/pip |
Same issue persists here. Deepin OS, 15.7. The interesting bit is that as regular user it fails but seems to work with sudo just fine:
The suggested workaround A solution posted on stackoverflow suggests editing
|
|
Maintainer note: Anyone that still gets this issue please see #5599.
Environment
The text was updated successfully, but these errors were encountered: