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!

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 ...