Getting Data In

After installing Splunk SDK for Python, why am I getting "ImportError: No module named spluklib.client" in my python code?

hchoisori
Engager

Hi,

I just started trying Splunk SDK in Windows.
I installed Python and Splunk SDK.
However I have an error "ImportError: No module named spluklib.client" in my python code.

What did I miss?

Thank you

0 Karma
1 Solution

thejeffreystone
Path Finder

I'm guessing your environment doesn't know where the splunklib dir in the sdk is located. Not sure how to set that up on windows. I'm sure python on windows came with pip though.

Try to install via pip:
from: http://dev.splunk.com/view/python-sdk/SP-CAAAEDG

Use pip:
pip install splunk-sdk

Also, I do not think it works with python3

View solution in original post

thejeffreystone
Path Finder

I'm guessing your environment doesn't know where the splunklib dir in the sdk is located. Not sure how to set that up on windows. I'm sure python on windows came with pip though.

Try to install via pip:
from: http://dev.splunk.com/view/python-sdk/SP-CAAAEDG

Use pip:
pip install splunk-sdk

Also, I do not think it works with python3

thambisetty
SplunkTrust
SplunkTrust

HI,

splunk-sdk-python folder is not created only splunklib is created after installing splunk-sdk-python using pip in windows. without having the splunk-sdk-python folder , how can we set pythonpath to splunk-sdk-python?

————————————
If this helps, give a like below.
0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...