Splunk® Enterprise

Installation Manual

Acrobat logo Download manual as PDF


Splunk Enterprise version 8.2 is no longer supported as of September 30, 2023. See the Splunk Software Support Policy for details. For information about upgrading to a supported version, see How to upgrade Splunk Enterprise.
This documentation does not apply to the most recent version of Splunk® Enterprise. For documentation on the most recent version, go to the latest release.
Acrobat logo Download topic as PDF

Choose your Splunk Enterprise upgrade path for the Python 3 migration

Splunk Enterprise administrators must plan the upgrade to Splunk Enterprise version 8.1 to account for the additional steps required due to the Python 2.7 end of life.

This page applies only to Splunk Enterprise. If you are a Splunk Cloud Platform administrator, work with Splunk Support to plan your upgrade.

In Splunk Enterprise version 8.1, Splunk Enterprise uses the Python 3 interpreter globally by default. You can choose to revert to Python 2, but Splunk Web supports only Python 3.7. Scripts and templates that depend on Splunk Web must be adjusted to use Python 3-compatible syntax before the upgrade, but you have options for how and when you adjust Python scripts that aren't dependent on Splunk Web.

For these files that aren't dependent on Splunk Web, Splunk Enterprise 8.1 offers per-file Python version switches in the configuration files. In addition, a global switch allows you to modify the default Python version.

Depending on your organization's requirements, you might choose to upgrade to Python 3 as comprehensively as possible as you upgrade to version 8.1 of Splunk Enterprise, using dual-compatible Python code or by rewriting Python scripts to be compatible only with Python 3. Or, you might choose to upgrade to version 8.1 without immediately performing a full Python 3 migration, by changing the default Python version to Python 2 and only modifying your scripts and templates that depend on Splunk Web.

Use the following table to choose the upgrade path that is best for you. If you use private, in-house apps, you have more choices about the time and method by which you upgrade. If you use Splunkbase apps, you are constrained by the choices of the app developer regarding compatibility with Python 2 and Python 3.

If you chose to migrate to Python 3 when you upgraded to Splunk Enterprise 8.0, then you do not need to complete any additional tasks regarding the Python migration in order to upgrade to Splunk Enterprise 8.1.

Statement that best describes you Overall effort Instructions
I want to use the default Python 3 runtime. Recommended. Lowest overall effort. Upgrade using the Python 3 runtime and dual-compatible Python syntax in custom scripts
I want to upgrade with minimal work, regardless of Python version. Low effort in the short term,
high effort in the long term.
Upgrade using the Python 2 runtime and make minimal changes to Python code

If you aren't sure which statement best applies to you, the best practice is to Upgrade using the Python 3 runtime and dual-compatible Python syntax in custom scripts.

Last modified on 31 January, 2022
PREVIOUS
Migrate a Splunk Enterprise instance from one physical machine to another
  NEXT
Upgrade using the Python 3 runtime and dual-compatible Python syntax in custom scripts

This documentation applies to the following versions of Splunk® Enterprise: 8.1.0, 8.1.1, 8.1.2, 8.1.3, 8.1.4, 8.1.5, 8.1.6, 8.1.7, 8.1.8, 8.1.9, 8.1.10, 8.1.11, 8.1.12, 8.1.13, 8.1.14, 8.2.0, 8.2.1, 8.2.2, 8.2.3, 8.2.4, 8.2.5, 8.2.6, 8.2.7, 8.2.8, 8.2.9, 8.2.10, 8.2.11, 8.2.12


Was this documentation topic helpful?


You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters