Categories
Flask

Enabling Python Virtualenv in Windows PowerShell

When installing Flask, you might want to create a unique environment for each project. To do this, you need to use a virtual environment.

On Visual Studio Code, type in the following in your Python shell, where env is the name of your virtual environment:

env\Scripts\Activate.ps1

Security Error

To correct the error above, type the code below into your PowerShell window:

Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser

Security Correction

As you can see from the above image, the virtual environment has now been created.

You can now install Flask.

Leave a Reply

Your email address will not be published. Required fields are marked *