Deployment Architecture

Python Versions in Splunk 8.0

sarvesh_11
Communicator

Hello Splunkers!

Wish You are safe and healthy from this pandemic.

I am using Splunk 8.0 Version, because it gives the flexibility with Python Versions (Python 2 and Python 3).

I have 2 different Splunk Applications, that gives me scripted inputs.

1 of the app executed on Python 2.7.17 and another runs on Python 3.7.17

How can i achieve the inputs from both of these apps?

Labels (1)
0 Karma

DavidHourani
Super Champion

Hi @sarvesh_11 ,

You can try modifying app.conf for a specific app under the install stanza:

 

python.version = {default|python|python2|python3}
* When 'installit.py' exists, selects which Python version to use.
* Set to either "default" or "python" to use the system-wide default Python
  version.
* Optional.
* Default: Not set; uses the system-wide Python version.

 

https://docs.splunk.com/Documentation/Splunk/latest/admin/appconf#.5Binstall.5D

This will apply the change only to that app and leave your other app with the default python version from your default server.conf.

Cheers,

David

0 Karma

sarvesh_11
Communicator

No @DavidHourani , that doesnt solves it.

I gave python.version in both app.conf for different application, but unable to execute Python3 scripts.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @sarvesh_11,

probably (I never tested it!) you could have two python instances, but my hint is to migrate as soon as possible the old one to the last Python version, because in few time Python 2 will be out.

Ciao.

Giuseppe

0 Karma

sarvesh_11
Communicator

That’s the last option I am left with.

but I wonder, why Splunk 8.0 embedded with 2 Python versions, if this usecase is not possible.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @sarvesh_11,

Splunk 8 has both the versions for retro compatibility but, for my knoledge, you can enable only one of them.

Did you tried the Python3 script with the Python2 interpreter?

Ciao.

Giuseppe

0 Karma

sarvesh_11
Communicator

No I did not.

Is there any handy doc or some link to which I can refer and resolve.

if that resolves, that would be great help.

 

TIA,

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...

Keep the Learning Going with the New Best of .conf Hub

Hello Splunkers, With .conf26 getting closer, there’s already a lot of excitement building around this year’s ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...