Ask Your Question

Revision history [back]

Evaluating sys.version should tell you the Python version. Running on my computer:

sage: sys.version
'2.7.3 (default, Sep  3 2012, 13:19:42) \n[GCC 4.6.3]'

On sagenb.org:

'2.7.3 (default, Jul 25 2012, 14:50:10) \n[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)]'

The first few characters tell me that it's using Python 2.7.3, in either case.

Evaluating sys.version should tell you the Python version. Running on my computer:

sage: sys.version
'2.7.3 (default, Sep  3 2012, 13:19:42) \n[GCC 4.6.3]'

On sagenb.org:

'2.7.3 (default, Jul 25 2012, 14:50:10) \n[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)]'

The first few characters tell me that it's using Python 2.7.3, in either case.

Edit: if you want to check the version number in some code, it's probably better to use sys.version_info.

Evaluating sys.version should tell you the Python version. Running on my computer:

sage: sys.version
'2.7.3 (default, Sep  3 2012, 13:19:42) \n[GCC 4.6.3]'

On sagenb.org:

'2.7.3 (default, Jul 25 2012, 14:50:10) \n[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)]'

The first few characters tell me that it's using Python 2.7.3, in either case.

Edit: if you want to check the version number in some code, it's probably better to use sys.version_info.

Evaluating sys.version should tell you the Python version. Running on my computer:

sage: sys.version
'2.7.3 (default, Sep  3 2012, 13:19:42) \n[GCC 4.6.3]'

On sagenb.org:

'2.7.3 (default, Jul 25 2012, 14:50:10) \n[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)]'

The first few characters tell me that it's using Python 2.7.3, in either case.

Edit: if you want to check the version number in some code, it's probably better to use sys.version_info.