Add the weekly progress to the following ppt.
- Clone the repository on your computer
- Ensure that Python is installed on your computer
- For Windows:
In cmd, type
python3 -version - For Ubuntu:
In the terminal, type
python3 -v
- For Windows:
In cmd, type
- Install pip in your Ubuntu system if not present using
sudo apt-get install python3-pip - Move into the project directory, here directory is named flask_app
- Install venv using
- For Windows:
type
pip install venv - For Ubuntu:
type
pip install venv
- For Windows:
type
- Create a Python virtual environment in the current directory
- For Windows:
type
python3 -m venv venv - For Ubuntu:
type
python3 -m venv venv
- For Windows:
type
- Activate the virtual environment using the following command
- For Windows:
type
.\venv\Scripts\activate- For Ubuntu: typesource venv/bin/activate
- Now you are in the virtual environment named
venv - Run the following command to install flask in your virtual environment
pip install Flask
- To install the necessary dependencies
- Run this command to install pipreqs library
pip install pipreqs - After successful installation, run the command
pipreqs- This will create a
requirements.txtfile
- This will create a
- Now run this command to install all the libraries required to run the program
pip install -r requirements.txt
- Run this command to install pipreqs library
- Now to execute the code:
- For Windows :
set FLASK_APP=hello.pyor$env:FLASK_APP="hello.py" followed byflask run` - For Ubuntu :
export FLASK_APP=hello.pyfollowed byflask run
- For Windows :