user1424739
user1424739

Reputation: 13645

What is the difference between `virtualenv -p python3` and `python3 -m venv`?

I see the following commands. But I am not sure about their differences. They seem both create virtual environment. Could anybody explain the differences? Thanks.

virtualenv -p python3 envname
python3 -m venv /path/to/new/virtual/environment

Upvotes: 1

Views: 970

Answers (1)

Zach Valenta
Zach Valenta

Reputation: 1879

basic breakdown

python3 -m venv = "make me a virtual environment using Python3's built-in venv module"

virtualenv -p python3 = "make me a virtual environment using the virtualenv package and use the Python3 binary to do it"

more

a more comprehensive answer re: Python's various environmental tools found here (as mentioned in the comment on your question)

Upvotes: 2

Related Questions