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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...