Devnote

Web Development Blog Company, Services India

MySQL Error 121 Duplicate key on write - Practical Repair Strategy
MySQL Error 121 Duplicate key on write – Practical Repair Strategy
February 13, 2026
PHP cURL error 60: SSL certificate problem - Windows & Linux Fix
PHP cURL error 60: SSL certificate problem – Windows & Linux Fix
February 11, 2026
Fix localhost refused to connect After Installing XAMPP / WAMP
Fix “localhost refused to connect” After Installing XAMPP / WAMP
February 9, 2026
Composer Error Memory exhausted When Installing Packages - Real Fix
Composer Error: Memory exhausted When Installing Packages – Real Fix
February 6, 2026
MySQL 8 Error Unknown collation: utf8mb4_0900_ai_ci - Safe Migration Guide
MySQL 8 Error Unknown collation: utf8mb4_0900_ai_ci – Safe Migration Guide
February 4, 2026
Devnote

Type and hit Enter to search

  • Home
  • Laravel
    • Auth
    • Migration
    • DATATABLE
    • Yajra
  • wordpress
    • plugin
    • WPBakery
    • woocommerce
  • PHP
    • MYSQL
    • Ajax
  • Blog
  • Informational
    • About us
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
  • Contact US
Devnote
  • Home
  • Laravel
    • Auth
    • Migration
    • DATATABLE
    • Yajra
  • wordpress
    • plugin
    • WPBakery
    • woocommerce
  • PHP
    • MYSQL
    • Ajax
  • Blog
  • Informational
    • About us
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
  • Contact US
How to create Python Virtual Environments

How to create Python Virtual Environments

Image
Devnote team
January 15, 2021
2
819 Views
0 Comments

This tutorial is for How to create Python Virtual Environments. A virtual environment is a tool that helps to keep dependencies required by different projects separate by creating. the virtual environment uses specific projects in the required packages installed so it can not affect another project. the virtual environment is one of the most important tools.

You are working on two web-based python projects one uses request 2.7.0 and the other uses request 2.25.1 and so on. In this situation, the virtual environment can be really useful to maintain dependencies of both projects using requires packages.

Check your Python installation has to pip

pip -V

If you see something like this: pip 20.3.3 from /usr/local/lib/python3.8/dist-packages/pip (python 3.8) text so you have pip installed, otherwise download and install pip.

Installing virtualenv

pip install virtualenv

Check your installation:

virtualenv --version

Output : virtualenv 20.2.2 from /usr/local/lib/python3.8/dist-packages/virtualenv/__init__.py

Create the virtualenv

To create a virtual environment, you must specify a folder path.

virtualenv devnote
Create the virtualenv

Run this command to create a directory named devnote will be created. Go to devnote directory and activate the python environment by running the following command:

# Linux / Mac OS

source bin/activate
# Windows

devnote\Scripts\activate

The virtual environment is activated, and the name of your virtual environment will appear on the left side of the terminal e.g. (devnote) root@ubuntu:/home/dev/Desktop/devnote#. Now work with your virtual environment.

The requests 2.7.0 package will be placed in devnote folder and will be isolated from the complete system.

pip install requests==2.25.1
pip install requests

Check install packages

Check how many packages are installed in your environment.

pip freeze
pip freeze

Deactivate the virtualenv

Once done with the work, you can deactivate the virtual environment and use your original Python environment by the following command:

deactivate

Categories:

python

Other Articles

How to Set Bearer Token as Environment Variable in Postman
Previous

How to Set Bearer Token as Environment Variable in Postman

Install Jenkins on Ubuntu Server 20.04 and Virtualbox
Next

How to install Jenkins on Ubuntu Server 20.04 and Virtual box

No Comment! Be the first one.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Related Posts

How to add a date filter to Django admin?

How to add a date filter to Django admin?

February 1, 2021
How to remove default apps in Django admin?

How to remove default apps in Django admin?

January 29, 2021
Remove an item from a list in Python

How to remove an item from a list in Python

January 28, 2021
How to change Django administration text?

How to change Django administration text?

January 25, 2021
Devnote

Devnote provides a collection of tutorials about PHP, Laravel, WordPress, Django, MySQL, Bootstrap, Jquery, Ajax, APIs, CRUD operations, etc.

Devnote © , All Rights Reserved.

Page Links

  • Home
  • About us
  • Blog
  • Contact US
  • Site map

Category

  • PHP
  • Laravel
  • wordpress
  • HTML
  • jQuery

Follow Us

Facebook Instagram Twitter Youtube Linkedin Pinterest
Morbi, Gujarat, India - 363641
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Cookie settingsACCEPT
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT
Advertisement