Creating virtual environments
This Episode covers:-
1.) How to create virtual environments in Windows.
2.) How to create virtual environments in macOS.
3.) How to create virtual environments in Linux.
👉Creating and activating virtual environments in Windows:-
Create a new directory for the projects:
Terminal
mkdir projects
cd projects
venv command creates the virtual environment. Activate it with the activate.bat script:
Terminal
python -m venv venv
venv\Scripts\activate.bat
The (venv) prefix indicates that the environment is active:
Terminal
(venv) C:\Users\samul\projects>
Rest of the book will mostly be the same for all operating systems.
Summary
- You can use the venv command to create virtual environments.
- Make sure to active the virtual environment before you start working on a project.
- You can use the venv command to create virtual environments.
- Make sure to active the virtual environment before you start working on a project.
- You can use the venv command to create virtual environments.
- Make sure to active the virtual environment before you start working on a project.

No comments:
Post a Comment
If you have any doubts. Please let me know.