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!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...