Creating Python Virtual Environment in Folder and on System - Step by Step Demo

Creating Python Virtual Environment in Folder and on System - Step by Step Demo

Automation Step by Step via YouTube Direct link

Introduction

1 of 15

1 of 15

Introduction

Class Central Classrooms beta

YouTube videos curated by Class Central.

Classroom Contents

Creating Python Virtual Environment in Folder and on System - Step by Step Demo

Automatically move to the next video in the Classroom when playback concludes

  1. 1 Introduction
  2. 2 What is a Virtual Environment
  3. 3 Benefits of a virtual environment
  4. 4 Step 1 - Python must be installed on the system python --version pip --version
  5. 5 Step 2 - Create a new folder, Open cmd prompt or terminal and goto the location of folder
  6. 6 Step 3 - Create a virtual environment by running the command python -m venv myenv
  7. 7 Step 4 - Activate the virtual environment by running the command myenv/bin/activate Linux/Mac
  8. 8 Step 5 - Once the virtual environment is activated, it’s name will be visible on the terminal myenv
  9. 9 Step 6 - We can install the packages in the project by running the command pip install package_name
  10. 10 Optional - We can use command pip freeze > requirements.txt to save all the dependencies in a single file
  11. 11 Step 1 - Run commands:
  12. 12 Step 2 - On cmd goto folder where you want to create project
  13. 13 Step 3 - Create a virtual environment using command mkvirtualenv <environment-name>
  14. 14 Step 4 - To bind our virtualenv with current working directory
  15. 15 Can check env and python details using - which python or where python

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.