["python","virtualenv","python-venv"]
What's the difference between "virtualenv" and "-m venv" in creating Python Virtual environments

Sorry if I sound a bit foolish. I'm confused about this: What's the difference between the two: virtualenv myvenv and -m venv myvenv The first one works well for me in creating virtual environments while the other does not. I cd into my development directory and use virtualenv myvenv and it creates the virtual environment. But if I use -m venv myvenv, it just gives errors.
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 installed with pip. They solve the same problem and work in a very similar manner. If you use python3 I suggest to avoid any "extra" dependencies and just stick with venv. Your error is probably because you use Python2/pip2.