Developing for Splunk Enterprise

What version of Python ships with Splunk?

Motivator

As the version of Python may introduce dependencies and incompatibilities, it's important to know what version is shipped with Splunk.

Tags (2)
1 Solution

Motivator

Splunk Enterprise

(Also applies to Splunk heavy or lightweight forwarder.)

Splunk 4.1 - 4.2                 Python 2.6.4
Splunk 4.3                       Python 2.7.2
Splunk 5.0                       Python 2.7.3
Splunk 6.0                       Python 2.7.5
Splunk 6.1                       Python 2.7.5

Universal Forwarder

Python is not included, but it can be used for scripted/modular inputs by installing separately. Inputs.conf files may need to be modified in order to execute scripts, depending on the OS configuration.

How to Determine Python Version

You can always find out the Python version like so:

$SPLUNK_HOME/bin/python --version

Also, the Splunk release notes should reflect the Python version. For example, for 5.0: http://docs.splunk.com/Documentation/Splunk/5.0/ReleaseNotes/Python

View solution in original post

Motivator

Splunk Enterprise

(Also applies to Splunk heavy or lightweight forwarder.)

Splunk 4.1 - 4.2                 Python 2.6.4
Splunk 4.3                       Python 2.7.2
Splunk 5.0                       Python 2.7.3
Splunk 6.0                       Python 2.7.5
Splunk 6.1                       Python 2.7.5

Universal Forwarder

Python is not included, but it can be used for scripted/modular inputs by installing separately. Inputs.conf files may need to be modified in order to execute scripts, depending on the OS configuration.

How to Determine Python Version

You can always find out the Python version like so:

$SPLUNK_HOME/bin/python --version

Also, the Splunk release notes should reflect the Python version. For example, for 5.0: http://docs.splunk.com/Documentation/Splunk/5.0/ReleaseNotes/Python

View solution in original post

Splunk Employee
Splunk Employee

Docs are fixed, thanks!

0 Karma

Motivator

@ChrisG The docs are wrong. We should have somebody fix that. 😉 Srsly, confirmed this with 5.0.1.

Splunk Employee
Splunk Employee

The 5.0 release notes say it's Python 2.7.2, not 2.7.3. http://docs.splunk.com/Documentation/Splunk/5.0/ReleaseNotes/Python

0 Karma

SplunkTrust
SplunkTrust

@halr9000 The last time I tried, I don't believe the sqlite3 module was included either. That may have changed

0 Karma

Motivator

@dshpritz answer 3138 (linked above) says that distutils module isn't included, so that's one difference that I'm aware of. I know that our distribution of 2.6 doesn't include argparse, but for all I know, that wasn't included with standard Python until 2.7 anyhow.

0 Karma

SplunkTrust
SplunkTrust

Also good to know:
From what I understand, this is not the standard distribution of Python, so some of the standard libs might not be available.

0 Karma

Motivator

Also note that the Splunk App for VMware "FA" (forwarder appliance) versions 1 and 2 ship with Splunk 4.2.5 configured as a heavy forwarder.

0 Karma

Motivator
0 Karma