What’s the difference between “virtualenv” and “-m venv” in creating Virtual environments(Python)

venv is a package shipped directly with python 3. So you don’t need to pip install anything.

virtualenv instead is an independent library available at https://virtualenv.pypa.io/en/stable/ and can be install with pip.

They solve the same problem and work in a very similar manner.

If you use python3 I suggest to avoid an “extra” dependancy and just stick with venv

Your error is probably because you use Python2/pip2

Leave a Comment

tech