确定 python 在 linux 中运行的位置

Lan*_*ins 4 linux shell python

我通常在 Windows 上使用 python 工作,我使用 dos 命令where python来确保我使用的是 python 的虚拟环境版本。linux shell 中的等效命令是什么?

谢谢!

小智 8

使用which python.


$ which python
/usr/bin/python
Run Code Online (Sandbox Code Playgroud)
C:\Users\anossovp>where python
c:\Python27\python.exe
Run Code Online (Sandbox Code Playgroud)