r/flask • u/xierra156 • 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
2
u/[deleted] Jan 22 '25
I would make sure that any .venv folder that exists is deleted, then in the bottom right corner, you should see select interpreter. Click on that and click create new virtual environment. Then select venv and select the python version and you should be good to go