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!

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!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...