virtualenv
is installed by default with python itself and when you install virtualenv
via pip3
and try to create virtual environment using pipenv
you will get this error:
ModuleNotFoundError: No module named 'virtualenv.seed.embed.via_app_data
Check the version of installed virtualenv
using apt list --installed
:
python3-virtualenv/focal,focal,now 20.0.17-1 all [installed,automatic]
with the installed virtualenv
by pip3
:
virtualenv 20.4.0
Default installation of virtualenv
is different with pip3
installed virtualenv
So when you try to create a virtual environment using pipenv
(for example installing Django in a directory home/user/django
with pipenv install django~=3.1.5
you will get that error.
The solution is to remove installed virtualenv
using pip3 uninstall virtualenv
and use the default installation of virtualenv
. This time when you create virtual environment with pipenv
it will create it successfully.