Whenever I run pip
to install the Flask packages like virtualenv
in Ubuntu 16.04, I get this error:
pip install virtualenv
I just ran into this with a different package, using Python 3.6.5 and pip 19.2.3. I was hesitant to use the solutions here (and on similar SO questions) so I just tried the following and it cleared up the issue:
pip install --force-reinstall package_with_metadata_issue
Note that my case was complaining about the black
package, which was a dependency of something else I was trying to install (with a simple pip install other_package
). Black had already been installed and working on my system for a while, so it's unclear how it got into a bad state or what changed in pip such that it couldn't handle the package's state.
To be specific, the OP could try:
pip install --force-reinstall virtualenv
Though it seems like many other people here had an issue with pip itself, so that may just be kicking the can down the road until pip is in a good state.