Splunk Dev

How to resolve error: "No module named 'splunklib.client'; 'splunklib' is not a package" (Mac and Python 3.7.1)?

nareshabburi
Engager

Hi
I'm trying to connect to splunk from my python env and I'm getting this error.
I have installed SDK Lib and also I'm able to import splunklib, but not able to import splunklib.client as client
running on mac and python 3.7.1
can someone please help?

Thanks.
Naresh

Labels (2)
0 Karma

nareshabburi
Engager

after a little research, I found that splunklib is a python script and is not a library folder.

Mac Terminal - ls /anaconda3/lib/python3.7/site-packages/splunklib.py

why is that? isn't it supposed to be a library/folder... ? how do I get a splunklib package instead of a script?

please help!

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