1

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
user1424739
  • 11,937
  • 17
  • 63
  • 152
  • 1
    Possible duplicate of [What is the difference between venv, pyvenv, pyenv, virtualenv, virtualenvwrapper, pipenv, etc?](https://stackoverflow.com/questions/41573587/what-is-the-difference-between-venv-pyvenv-pyenv-virtualenv-virtualenvwrappe) – OneCricketeer Apr 22 '18 at 09:53
  • `venv` is available in Python3.6+, and `virtualenv` needs to be externally installed. More info: https://github.com/pypa/pipenv/issues/15 – OneCricketeer Apr 22 '18 at 09:55

1 Answers1

2

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)

Zach Valenta
  • 1,783
  • 1
  • 20
  • 35