python version

How to use different Python version with virtual environments?

Use the flag -p with virtualenv command to specify the python version that you would want to use

$ virtualenv -p /usr/bin/python/2.7

For windows environment, use

c:\> virtualenv –python=c:\Python27\python.exe myenv

Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

How to check Python version number in Linux/Unix environment?

To check the Python version number in Linux, simply type


$ python -V

You will get an output

Python 2.4.3
Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn
Kurinchi Calendar
February 2018
M T W T F S S
« Oct    
 1234
567891011
12131415161718
19202122232425
262728