Showing posts with label python virtualenv error. Show all posts
Showing posts with label python virtualenv error. Show all posts

Saturday, December 19, 2020

Python Error while creating virtualenv 'ImportError: No module named importlib_metadata'

Python Errors while creating virtualenv

ImportError: No module named importlib_metadata

or

AssertionError: importlib-metadata>=0.12; python_version < "3.8" .dist-info directory not found

or

NameError: name 'ModuleNotFoundError' is not defined

Solution :

You need to upgrade pip.

pip install --upgrade --user pip

Once the pip is upgraded, you should not get the error. If you are using pip3 then use pip3 instead of pip in the command.

You can see the solution in the following video.