On your local machine have python 3 install
open your terminal or command prompt. Navigate to the directory where you want to create the virtual environment. Run the following command to create a virtual environment named myenv:
Copy code
python3 -m venv myenvReplace myenv with the name you want to give to your virtual environment. Once the command completes, you'll have a new directory named myenv (or whatever name you chose) in your current directory. This directory contains the virtual environment. To activate the virtual environment, use the appropriate command based on your operating system: On Windows:
Copy code
myenv\Scripts\activateOn macOS and Linux:
Copy code
source myenv/bin/activateTo deactivate the virtual environment and return to the global Python environment, simply type:
Copy code
deactivateRun the command on your shell or terminal
Copy code
pip3 install -r requirement.txtpip3 freeze > requirement.txt uvicorn main:app --reload