-
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
ModuleNotFoundError: No module named 'pip._vendor.pkg_resources'
AND AttributeError: '_NamespacePath' object has no attribute 'sort'
#4330
Comments
the first error is pretty much a linux disribution breaking pip intentionally as usual, nothing pip an do about it the second error is related to not installing the ffi header and development packages, usually something like ffi-dev/ffi-devel or libffi-dev/libddi-devel, please figure the correct name for your distro |
To me, it seems the first error is related to #4216. |
@pradyunsg But this happens with any Pip command. @RonnyPfannschmidt How would I un-break pip? I need it. If you're talking about Apport I've already disabled it and the exception still occurs. It was never related to Apport anyway. I updated the exception in the OP. |
ModuleNotFoundError: No module named 'pip._vendor.pkg_resources'
AND AttributeError: '_NamespacePath' object has no attribute 'sort'
Sidenote: @LoganDark You have edited out the latter part of the OP. It would have been better to mention how you fixed the error or at the very least strike out the contents, instead of outright removing it.
Yes. That's the issue. The fix is to upgrade to setuptools vendored with pip to >= 31.0.1 which fixes this issue. (editted) |
@pradyunsg and how exactly would I do that? easy_install? as I said, pip is broken. I don't know how to upgrade python modules manually. |
|
Oh wait, I had uninstalled python3.6. |
Update:
|
@LoganDark This seems to be (somehow) related to your OS installation of pip, as @RonnyPfannschmidt said. You should raise this on your OS support channel. There's not much we can do here if the OS vendor has changed things. Specifically:
If you're hitting #4216, then there's no released fix yet in pip, so you'd need to revert to a version previous to ones with the issue. To get help with downgrading pip, you'd once again need to speak to your OS support channel. I believe it'd be some form of apt-get command you would need, but I don't personally know any more than that. I can't say precisely which version of pip you'd need to downgrade to, but I've asked that question on your behalf on #4216 - if you monitor that issue you should hopefully get the answer there. (You;d then still need to ask on Ubuntu support how to downgrade to that version, of course...) |
#4216 fix: |
Alright. Installing |
So after using pip as root and seeing it working, I knew the erroneous package was in my
I'm not kidding either. I might also try reinstalling every package from a previous |
Ignore the version warning. That of course is because I purged my local site-packages before doing this. |
Closing as duplicate of #4216. |
One suggested solution on Anaconda3 in windows 10:
|
Can anyone help here. (C:\Users\HARSHALL\Anaconda3) C:\Users\HARSHALL>pip install --upgrade keras |
@hlamba28 You either have a broken |
@hlamba28 On my box I fixed a similar issue following steps suggested by @shuai-uulm |
I had this issue on Arch and fixed it with: sudo rm -rf /usr/lib/python3.6/site-packages/pip/
sudo pacman -Syu python-pip |
@itay-grudev .. That's it!!! |
@itay-grudev that worked. |
@itay-grudev sometimes |
@itay-grudev That worked. Thanks |
@itay-grudev great bro thanks!!!!!!! |
Description:
Pip errors whenever I use the command. It doesn't matter which command.
python3.6 -m pip
errors.What I've run:
The text was updated successfully, but these errors were encountered: