WHY DID I STOP USING COMMAND LINE TO ACTIVATE MY VIRTUAL ENVIRONMENT ?

WHY DID I STOP USING COMMAND LINE TO ACTIVATE MY VIRTUAL ENVIRONMENT ?

Learn how to create Virtual Environment using venv and activate using executables. What is a Virtual Environment? Virtual Environments help create, manage and isolate environments for the project, each one using same or different versions of the executables.

What is a Virtual Environment?

Virtual Environments help create, manage and isolate environments for the project, each one using same or different versions of the executables.

Why do we need one?

Consider the following scenario where you have two projects: Project A and Project B, both of which have a dependency on the same library, Project C. The problem becomes apparent when we require different versions of Project C. Maybe Project A needs v1.0.0, while _Project B _requires the newer v2.0.0. This is a real problem for Python since it can’t differentiate between versions in the same directory.

Where do we need one?

With growing Python-compatible web frameworks like Django, Flask and increasing cloud services like AWS, Google Cloud, Heroku, linode, etc. along with a multitude of companies taking their businesses online and each project needing its own libraries and versions, it becomes important to isolate each project.

In this guide we look forward to creating a Virtual Environment in a project folder.

Consider a folder/directory My_Project in which we want to create a virtual environment named Test

1. Check if Python has been installed correctly.

Run Command Prompt (CMD) or Windows PowerShell window and navigate to the My_Project directory and execute python followed by exit() If you get the same output as in the image, then everything is working fine.

Image for post

Image for post

If it says python is not recognized as an internal or external command, operable program or batch file then you have to add the directory in which python.exe exists to the Environment variables.

python-virtualenv hands-on virtual-environment raghuvansh-tahlan python

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Virtualenv or Venv ? Virtual Environments in Python [Complete Guide]

In this video we will learn the basics of virtualenv or venv in Python. We will learn how to install virtualenv, activate virtualenv for different versions o...

“Python Virtual Environment ” in Nutshell.

I will walk you through everything about Virtual Environment in Python that you should know like from “what is virtual…

Python Environment 101

Python Environment 101 .How are pyenv and pipenv different and when you should be using them

How to Create Python Virtual Environments on Ubuntu 18.04

Python virtual environment is a self-contained directory tree that includes a Python installation and number of additional packages. In this tutorial, we'll provide a step by step instructions about how to create Python virtual environments on Ubuntu 18.04.

Python Tricks Every Developer Should Know

In this tutorial, you’re going to learn a variety of Python tricks that you can use to write your Python code in a more readable and efficient way like a pro.