For video tutorial SUBSCRIBE to, TechFryDay
Step-1: Creating & activating venv Windows:
python -m venv venv
./venv/Scripts/activate
Linux:
python -m venv venv
source venv/bin/activate
Step-2: Installing Dependencies
pip install -r requirements.txt
Step-3: Running application Windows:
> $env:PYTHONDONTWRITEBYTECODE=1;$env:FLASK_APP="app";$env:FLASK_ENV = "development"
> flask run
Linux:
> export PYTHONDONTWRITEBYTECODE=1 FLASK_APP="app" FLASK_ENV="development"
> flask run
pip install -r requirements.txt
- Creating pycache files Windows-powershell-Solution:
$env:PYTHONDONTWRITEBYTECODE=1
Linux:
export PYTHONDONTWRITEBYTECODE=1
-
While activating venv this error occures in Windows:
+ CategoryInfo : SecurityError: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess
Solution: Execute this command and retry activating venv.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser