1

I'm using the MySQL Workbench to run MySQL 5.7 and I have Python installed.

rhcpfan
  • 11

2 Answers2

3

Run the following commands and whichever gives an output is the version you have:

  • Python 2: python --version
  • Python 3: python3 --version

Note: You can have both installed and used independently by simply adding the shebang to the top of the Python script to indicate which you want to use. Example:

python 2 script: #!/usr/bin/python
python 3 script: #!/usr/bin/python3
wjandrea
  • 14,236
  • 4
  • 48
  • 98
George Udosen
  • 36,677
0

I am on Babun (Cygwin fork) and when I type python --version it displays the version.

$ python --version
Python 2.7.8

On a sidenote:

if you have different versions of Python installed, you can switch between them using a shell alias (add to your .bashrc) for example:

alias python=/usr/local/bin/python2.7

Please do use this carefully, as it might break things. Switching between 2.6 and 2.7 should normally work.

impalle
  • 177