Open tangculiji0612 opened 2 years ago
does this error happen when you try to install any other library other than your current one? Could you try to uninstall python and reinstall it?
It looks like you're trying to install the package globally (which generally isn't a good idea). Can you try installing into a virtual environment (see the guide here if you're unsure) to see if the problem persists.
can you try to upgrade your pip to pip3 and try?
what is your pip version?
I came across this issue today, and my pip version is pip 22.2.2
. For me it's any pip command like pip show numpy
also throwing this error. My solution is:
/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py
1895 adding the actual problem file to log:
vi /usr/local/python3.7.5/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py +1895
- raise KeyError("No metadata except PKG-INFO is available")
+ raise KeyError("No metadata except PKG-INFO is available: {}".format(self.path))
xxx.dist-info
file valid. For mine it's caused by a broken soft link. Remove or rename that and try again.PYTHONPATH='' pip install sympy
works.This is an error that's only happening on < 3.10, since pip will will use a different metadata backend than pkg_resources
on Python 3.10+.
I made an error when executing the PIP install command: