Splunk Enterprise

unable to execute Python script using custom search command

vijayaaccent
New Member

Hi,

I am seeking assistance to execute Python script located under custom app.  Script is working fine in cmd prompt. But from Splunk console it is throwing error code 1.

I am trying to invoke script through below custom search command defined under commands.conf file.

| script <python script>

I have also installed required modules like Pandas and its dependencies. I am still seeing below errors. Please assist me to fix below errors

Traceback (most recent call last):
stderr import pandas as pd
stderr from 'C:\Program Files\Splunk\bin\Python3.exe \__init__.py", line 17, in <module>
stderr "Unable to import required dependencies:\n" + "\n".join(missing_dependencies)
ImportError: Unable to import required dependencies:
numpy
Importing the numpy C-extensions failed. This error can happen for
The Python version is: Python3.7 from "C:\Program Files\Splunk\bin\Python3.exe"
The NumPy version is: "1.22.0" and make sure that they are the versions you expect.
Original error was: No module named 'numpy.core._multiarray_umath'
External search command returned error code 1.

 

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...