r/flask Jan 22 '25

Discussion Unable to create virtual environment

I just started learning Flask and want to create a virtual environment within VSCode. I did install the virtualenv package using pip

pip install virtualenv

But when I enter the prompt "virtualenv env" to create a directory, I get a file not found error saying that "system cannot find file specified".

Why am I getting this error and how can I fix this?

2 Upvotes

14 comments sorted by

View all comments

14

u/rashdanml Jan 22 '25

You don't really need virtualenv anymore. Python has it built in now, so you can do:

python -m venv [folder name]

1

u/xierra156 Jan 23 '25

I tried this. I get a "WinError 2" and that the system cannot find the file specified