jeremy radcliff jeremy radcliff - 3 months ago 8
Python Question

I typed python -v in my terminal and something weird happened

Thinking I was about to check the version of Python installed on my computer, I typed

python -v


in my terminal and I got a first line saying


"installing zipimport hook", but then also a whole bunch of text (probably 50 or so lines of text), among which "import errno # builtin", "import posix # builtin", "import _codecs # builtin", and toward the end "Python 2.7.8 |Anaconda 2.1.0 (x86_64)| (default, Aug 21 2014, 15:21:46)"


What did I do? And what did that command install?

EDIT: the
v
I typed in
python -v
was a lowercase
v
. When I now try an uppercase
V
, I do get the version of Python on my computer.

Answer

You want python -V (uppercase) or python --version. The lowercase -v means “verbose” and adds a bunch of diagnostic information to the output that you can safely ignore.

Comments