KeyError: 'No metadata except PKG-INFO is available'
See original GitHub issueDescription
I made an error when executing the PIP install command:
root@ubuntu:~# pip install sympy
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple, https://pypi.ngc.nvidia.com
Collecting sympy
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d0/04/66be21ceb305c66a4b326b0ae44cc4f027a43bc08cac204b48fb45bb3653/sympy-1.10.1-py3-none-any.whl (6.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.4/6.4 MB 2.1 MB/s eta 0:00:00
Requirement already satisfied: mpmath>=0.19 in /usr/local/python3.7.5/lib/python3.7/site-packages (from sympy) (1.2.1)
ERROR: Error while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new
Traceback (most recent call last):
File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3021, in _dep_map
return self.__dep_map
File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2815, in __getattr__
raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3012, in _parsed_pkg_info
return self._pkg_info
File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2815, in __getattr__
raise AttributeError(attr)
AttributeError: _pkg_info
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 585, in _determine_conflicts
return check_install_conflicts(to_install)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_internal/operations/check.py", line 101, in check_install_conflicts
package_set, _ = create_package_set_from_installed()
File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_internal/operations/check.py", line 42, in create_package_set_from_installed
dependencies = list(dist.iter_dependencies())
File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_internal/metadata/pkg_resources.py", line 199, in iter_dependencies
return self._dist.requires(extras)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2736, in requires
dm = self._dep_map
File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3023, in _dep_map
self.__dep_map = self._compute_dependencies()
File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3032, in _compute_dependencies
for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3014, in _parsed_pkg_info
metadata = self.get_metadata(self.PKG_INFO)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1895, in get_metadata
raise KeyError("No metadata except PKG-INFO is available")
KeyError: 'No metadata except PKG-INFO is available'
What needs to be done
What shall I do?
Guidance for potential contributors
This issue is a good starting point for first time contributors – the process of fixing this should be a good introduction to pip’s development workflow. If there is not a corresponding pull request for this issue, it is up for grabs. For directions for getting set up, see our Getting Started Guide. If you are working on this issue and have questions, feel free to ask them here. If you’ve contributed code to pip before, we encourage you to pick up an issue without this label.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
PIP producing a KeyError: 'No metadata except PKG-INFO is ...
Run ls -l on each directory in sys.path and see if there's any file name ends with .dist-info , and is not a...
Read more >pip fails to upgrade - python - Stack Overflow
This is how I solved my pip fails to upgrade problem on Windows 10: 1) I had two versions of python installed and...
Read more >KeyError: 'No metadata except PKG-INFO is available' - Help
Hi, I'm encountering below error when installing using certbot-auto on Amazon Linux for Nginx. Previously I was able to install on another ...
Read more >Empty dist-info file breaks operations with pip >= 10.0.0
Version-Release number of selected component (if applicable): Name ... KeyError: 'No metadata except PKG-INFO is available' Expected results: No error.
Read more >No metadata except PKG-INFO is available - Overhang.IO
Hi, when I am restarting my platform, I am getting this error. mongodb_1 | 2020-08-28T12:56:23.699+0000 I NETWORK [initandlisten] connection ...
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
I came across this issue today, and my pip version is
pip 22.2.2
. For me it’s any pip command likepip 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: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.what is your pip version?