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!

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Introducing the Splunk Community Dashboard Challenge!

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

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...