0

I find this especially useful when using pyenv or virtualenv.

klenwell
  • 6,978
  • 4
  • 45
  • 84

1 Answers1

1

This works for me:

$ python -c "import sys; print(sys.executable)"

Sample output:

/home/klenwell/.pyenv/versions/2.7.7/bin/python
klenwell
  • 6,978
  • 4
  • 45
  • 84