Splunk Search

running a script saved in SPLUNK_Home/bin/scripts import issues

splunk_user4
Explorer

Trying to set up a script to add a users to an AD group, got the script working on my computer and when I try to add it into splunk in the script folder the imports aren't working.

 

file test.py line 21, in <module>
import pandas as pd
ImportError: No module named pandas

Keep getting this error and others for different modules but the modules are installed. same with LDAP3

Requirement already satisfied: pandas in /usr/local/lib64/python3.6/site-packages
Requirement already satisfied: numpy>=1.13.3 in /usr/local/lib64/python3.6/site-packages (from pandas)

Requirement already satisfied: ldap3 in /usr/local/lib/python3.6/site-packages
Requirement already satisfied: pyasn1>=0.1.8 in /usr/local/lib/python3.6/site-packages (from ldap3)

Tags (1)
0 Karma
1 Solution

splunk_user4
Explorer

Got it to work with pip3 install --target=$SPLUNK_HOME/lib/python3.7/site-packages ldap3

View solution in original post

0 Karma

splunk_user4
Explorer

Got it to work with pip3 install --target=$SPLUNK_HOME/lib/python3.7/site-packages ldap3

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

Ready to make your IT operations smarter and more efficient? Discover how to automate Splunk alerts with Red ...