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!

Faster Insights with AI, Streamlined Cloud-Native Operations, and More New Lantern ...

Splunk Lantern is a Splunk customer success center that provides practical guidance from Splunk experts on key ...

Splunk Enterprise Security: Your Command Center for PCI DSS Compliance

Every security professional knows the drill. The PCI DSS audit is approaching, and suddenly everyone's asking ...

Developer Spotlight with Guilhem Marchand

From Splunk Engineer to Founder: The Journey Behind TrackMe    After spending over 12 years working full time ...