Splunk Dev

Can python 3.7 script run in splunk search/SPL?

teddyidc1101
Communicator

Hi - We will be running script that was coded in python 3.7 (*.ipynb) in our splunk version 7.x, will the script run/work ? If not, what is the best way to run it?

Thanks!

Labels (2)
0 Karma

hallt3
Path Finder

Don't think so (but I'm not sure). The good news is most of the python 3.x.x features have been backported in to python 2.7.x.

0 Karma

badarsebard
Communicator

Currently there are limited options for executing Python3 code in Splunk. The simpler solutions call for using a wrapper script which will execute using the Splunk built-in Python interpreter and then call a different script using another interpreter in some way.

A more complicated option but with greater flexibility and options is an app called PyDen. This app allows you to install additional versions of CPython, create virtual environments, and install PyPI packages to the environments.

I also have to point out that ipynb files are Jupyter notebooks and would need to be converted to standard .py files first.

Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...