-1

My python doesn't have installed virtualenv, But why the command 'python3 -m venv tutorial-env' in python documents can create a virtual environment, And if I want to achieve the same feature, the normal method is 'pip install virtualenv'? Why? Is it the former method that has a built-in package similar to virtualenv?

Thanks in advance.

TSZLD
  • 1
  • 4

1 Answers1

0

Venv and virtualenv are different python packages and they accomplish the same thing: Virtualenv has to be downloaded, venv comes by default with python.

Virtualenv: https://help.dreamhost.com/hc/en-us/articles/115000695551-Installing-and-using-virtualenv-with-Python-3

python -m virtualenv env

Venv: https://docs.python.org/3/library/venv.html

python -m venv env

--Edit--

Related post: What's the difference between "virtualenv" and "-m venv" in creating Virtual environments(Python)

David Bros
  • 94
  • 6