4
I normally work in python on Windows and I use the dos command where python
to make sure that I am using the virtual environments version of python. What is the equivalent command in the linux shell?
Thanks!
4
I normally work in python on Windows and I use the dos command where python
to make sure that I am using the virtual environments version of python. What is the equivalent command in the linux shell?
Thanks!
8
Use which python
.
$ which python
/usr/bin/python
C:\Users\anossovp>where python
c:\Python27\python.exe
4
The thing you are usually looking for is not where Python itself is, but where it's libraries are. For that I would recommend this:
(from within the Python shell)
import sys
import pprint
pprint.pprint(sys.path)
Outside of that you can still do which python
naturally.
I think you are looking for command:
ps -aux | grep python
– Grijesh Chauhan – 2013-04-13T20:01:14.757