Stack How?
Stackorigin – The Community of Question and Answers Latest Articles
Read More About Python List Comprehension with examples
Python List Comprehension: Python List comprehension provides a much more short syntax for creating a new list based on the values of an existing list. Advantages of List Comprehension in Python: Time Efficient than loop Space Efficient than loop Needs ...
Do not accept an offer letter from companies.
Do not accept an offer letter from companies without verifying the following points. Designation Salary Details & CTC Distribution Leave Policies Working Hours & Days Medical Coverage/Insurance Probation Period Notice Period Benefits and Perks Bonus F&F Policy
How to call API using Ajax
AJAX stands for Asynchronous JavaScript and XML and its used for to make calls to the server to fetch some data. In this article, we will learn how to implement a simple API call using AJAX technology. How to use GET ...
A Virtual Environment is a python environment, that is an isolated working copy of Python which allows you to work on a specific project without affecting other projects
So basically it is a tool that enables multiple side-by-side installations of Python, one for each project.
Creating virtual environment in Linux
If pip is not in your system
Then install virtualenv
Now check your installation
Create a virtual environment now,
After this command, a folder named virtualenv_name will be created. You can name anything to it. If you want to create a virtualenv for specific python version, type
or
Now at last we just need to activate it, using command
Now you are in a Python virtual environment
You can deactivate using
Creating Python virtualenv in Windows
If python is installed in your system, then pip comes in handy.
So simple steps are:
1) Install virtualenv using
2)Now in which ever directory you are, this line below will create a virtualenv there
And here also you can name it anything.
3) Now if you are same directory then type,
You can explicitly specify your path too.
Similarly like Linux you can deactivate it like