pip
pip copied to clipboard
Only emit a metadata warning once
From https://github.com/pypa/pip/issues/11352#issuecomment-1238235954
BTW, the warning is quite noisy:
[root@9a62f3789682 /]# mkdir -p /usr/lib64/python3.11/site-packages/mercurial-6.2-py3.11.egg-info [root@9a62f3789682 /]# pip list WARNING: Skipping /usr/lib64/python3.11/site-packages/mercurial-6.2-py3.11.egg-info due to invalid metadata entry 'name' Package Version ---------- -------- gpg 1.17.0 libcomps 0.1.18 pip 22.2.2 rpm 4.18.0b1 setuptools 62.6.0 WARNING: Skipping /usr/lib64/python3.11/site-packages/mercurial-6.2-py3.11.egg-info due to invalid metadata entry 'name' WARNING: Skipping /usr/lib64/python3.11/site-packages/mercurial-6.2-py3.11.egg-info due to invalid metadata entry 'name' WARNING: Skipping /usr/lib64/python3.11/site-packages/mercurial-6.2-py3.11.egg-info due to invalid metadata entry 'name'
Can this be improved with better caching? Or switching to use ResourceWarning?
same here, any solution?
same here, any solution?
rm -rf $NOISY_DIR_NAME
Feel free to contribute. I imagine this can be improved by caching the metadata-parsing function (that emits this message), or by maybe using warnings instead.
Feel free to contribute. I imagine this can be improved by caching the metadata-parsing function (that emits this message), or by maybe using
warningsinstead.
I "fixed" this by finding the package and uninstalling it using pip. But it still gives warnings. So I rm -rf that dir and reinstall the package by pip. It works and has no harmful impact for now.
Why am I starting to get these warnings all the time over the past few months? Anyone know what changed? Often I get these warnings for Python packages installed by MacPorts
Why am I starting to get these warnings all the time over the past few months? Anyone know what changed? Often I get these warnings for Python packages installed by MacPorts
The same issue can occur with Python packages installed via Homebrew. You can attempt to uninstall them using Macports/Homebrew and then reinstall them using pip. However, certain packages are necessary dependencies for software such as vim. Therefore, you will have to tolerate this situation for now.
For what it's worth as others stumble on this, I just pip uninstall [name] then pip install [name] and the errors went away. I did not have to rm -rf the directory.
I'd also like to understand why this just started out of the blue?
In my recent homebrew build of python, it appeared to be specific to python3.12
I installed python3.11 and built the virtual environment with that (python3.11 -m venv venv)
Doing a pip install in this 3.11-based environment worked for me.