Installation

Getting "ImportError: No module named setuptools" when trying to install the Splunk Python SDK on Splunk 6.4.1 server?

a212830
Champion

Hi,

We are trying to install the Splunk Python SDK, and getting errors. We execute:

python setup.py install
Traceback (most recent call last):
  File "setup.py", line 17, in 
    from setuptools import setup, Command
ImportError: No module named setuptools

We are running this as root, on a server with Splunk 6.4.1 installed in /apps/splunk directory. Can someone help us?

Labels (1)
0 Karma

shaskell_splunk
Splunk Employee
Splunk Employee

The Python SDK uses setuptools as part of the install process. You'll need to use whatever package manager (yum, dpkg, etc) to install setuptools or alternatively download and install by hand if you're not using the Python install provided by your OS.

For instance on RHEL/CentOS

yum -y install python-setuptools

Once setuptools is installed the Python SDK should install with no issues.

jangid
Builder

This solution works if you use stand alone python but doesn't work if you Python shipped with Splunk.

0 Karma

sloshburch
Splunk Employee
Splunk Employee

If I'm following this correctly, the point is that if you're using the SDK you are using a system that doesn't have Splunk installed on it and therefore using standalone python. I could be misunderstanding though...

0 Karma

a212830
Champion

Thanks. They should document that - it's not on the instructions.

0 Karma

sloshburch
Splunk Employee
Splunk Employee

I just gave the docs team a heads up as per your feedback. Thanks for that!

Also, if this works out for you, make sure to mark @shaskell's response as an accepted answer.

Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...