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!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...