Splunk® SOAR (On-premises)

Develop Apps for Splunk SOAR (On-premises)

Acrobat logo Download manual as PDF


This documentation does not apply to the most recent version of Splunk® SOAR (On-premises). For documentation on the most recent version, go to the latest release.
Acrobat logo Download topic as PDF

Platform installation for Python 3

The Splunk SOAR installation include a Python 3 runtime environment.

Python installation path

Only Python 3 is included in the platform installation.

  • The path to Python 3 is <SOAR_HOME>/usr/python36/bin/python3.6m.
  • For Splunk SOAR (Cloud) installations, <SOAR_HOME> is /opt/phantom.

A symlink to <SOAR_HOME>/usr/bin/python3 is included for convenience. Splunk SOAR (Cloud) uses this symlink to access Python.

Pip installation path

Pip 3 is included in the platform for installing Python 3 packages.

Pip 3 is included in <SOAR_HOME>/usr/python36/bin/pip3.

A symlink to pip 3, <SOAR_HOME>/usr/bin/pip3 is included. Splunk SOAR (Cloud) uses this symlink to access pip 3.

App development script installation path

This entire section refers to scripts and CLI/SSH items which are not available in Splunk SOAR (Cloud).

The following scripts are included in the platform for developing Python 2 and Python 3 apps:

  • create_tj.pyc
  • create_output.pyc
  • compile_app.pyc

The script names are the same for each environment, the options are the same, and the outputs are the same.

Compatible Python 2 scripts

Scripts that are compatible with Python 2 are included in the following location:

  • For standard installations, <SOAR_HOME> is /opt/phantom.
  • For non-root installations, <SOAR_HOME> is configured by the customer.
  • The path to scripts is <SOAR_HOME>/bin/py2/<script>.

Run the scripts using phenv python2 as follows:

[phantom@phantom phipinfoio]$ phenv python2.7 <SOAR_HOME>/bin/py2/<script>.pyc

Compatible Python 3 scripts

Scripts that are compatible with Python 3 are included in the following location:

  • For standard installations, <SOAR_HOME> is /opt/phantom.
  • For non-root installations, <SOAR_HOME> is configured by the customer.
  • The path to scripts is <SOAR_HOME>/bin/<script>.

Run the scripts using phenv python3 as follows:

[phantom@phantom phipinfoio]$ phenv python <SOAR_HOME>/bin/<script>.pyc
Last modified on 22 September, 2021
PREVIOUS
Map Template
  NEXT
Convert apps from Python 2 to Python 3

This documentation applies to the following versions of Splunk® SOAR (On-premises): 5.0.1


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