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
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!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...