How to create a virtual environment to run a particular version of python

0 votes

Hi Guys,

I have multiple versions of python installed in my system. I want to create a virtual environment such that when I run python3 command it launches the specified version of python.

Can anyone tell me how to launch a virtual environment?

Jun 25, 2020 in Python by akhtar
• 38,260 points
768 views

1 answer to this question.

0 votes

Hi@akhtar

To create a virtual environment, decide upon a directory where you want to place it, and run the venv module as a script with the directory path.

$ python3 -m venv tutorial-env

Once you’ve created a virtual environment, you may activate it using the below-given command:

$ tutorial-env\Scripts\activate.bat
answered Jun 25, 2020 by MD
• 95,460 points

Related Questions In Python

0 votes
1 answer

How to create a zip archive of a directory in Python?

Hello @kartik, The easiest way is to use shutil.make_archive. ...READ MORE

answered May 11, 2020 in Python by Niroj
• 82,840 points
637 views
0 votes
1 answer

How to create a zip archive of a directory in Python?

Hii, The easiest way is to use shutil.make_archive. It ...READ MORE

answered Nov 20, 2020 in Python by Niroj
• 82,840 points
890 views
0 votes
2 answers

How to calculate square root of a number in python?

calculate square root in python >>> import math ...READ MORE

answered Apr 2, 2019 in Python by anonymous
5,859 views
+1 vote
2 answers

How to print first character of each word in upper case of a string in Python

class Solution:     def firstAlphabet(self, s):             self.s=s              k=''              k=k+s[0]              for i in range(len(s)):                     if ...READ MORE

answered Oct 28, 2020 in Python by Anurag
12,389 views
0 votes
3 answers

Python Selenium best tutorials for beginners

Hope this will help you...Python Tutorial READ MORE

answered Feb 11, 2019 in Python by aldrinjohn
• 140 points
3,932 views
0 votes
1 answer

I have trained a model using machine learning algorithm in python , now i want to create a browser extension of that saved model , Is it possible ??

Hi@Shubham, It may possible. When you saved your ML ...READ MORE

answered Jun 13, 2020 in Python by MD
• 95,460 points
1,128 views
0 votes
1 answer

How to create lambda function inside a list in Python?

Hi@akhtar, The lambda statement can appear in places ...READ MORE

answered Jun 25, 2020 in Python by MD
• 95,460 points
637 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP