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!

Fall Into Learning with New Splunk Education Courses

Every month, Splunk Education releases new courses to help you branch out, strengthen your data science roots, ...

Super Optimize your Splunk Stats Searches: Unlocking the Power of tstats, TERM, and ...

By Martin Hettervik, Senior Consultant and Team Leader at Accelerate at Iver, Splunk MVPThe stats command is ...

How Splunk Observability Cloud Prevented a Major Payment Crisis in Minutes

Your bank's payment processing system is humming along during a busy afternoon, handling millions in hourly ...