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!

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...