problem while installing splunk-sdk-python
As mentioned in the document, i cloned the splunk-sdk-python setup from github. when i try to install the sdk using command "python setup.py install", it throws the error that "could not find coverage module. Please install it and try again".
Please tell what could be the possible reason for error. Are there any path settings required?
The error you're getting is what you would expect from "python setup.py coverage", which runs the test suite with code coverage. There shouldn't be a path in the code to arrive at it from the install subcommand, and I just tried cloning and installing on a clean system and didn't get it.
I can't imagine what kind of path settings could cause this. Could you give some detail on your configuration?
I have splunk 5.0 installed on Windows 7. I have cloned the sdk directly from GitHub The python inbuilt within splunk is version 2.7. Since, I am new to splunk and python, i would like to confirm that I am running the command "python setup.py install" on GitShell. Can you please tell me the exact steps of python sdk installation.
Aha! This is something that catches everyone at some point. There are two distinct Python installations involved in all this. Splunk ships with an internal Python (based on 2.7, but there are a number of modifications). But in the GitShell, you're running a Python installed elsewhere in your system.
Can you run Python in GitShell and tell me what version it displays when it starts up the interpreter?
If it's Python 3, then we've found the problem. We're (intentionally) on the lagging edge of the Python 2 to 3 transition. Python 3 has become common enough where we're planning to make the transition, but it probably won't be in the next couple of months, since other projects are currently eating our developers. In this case, you'll need to install Python 2.7 on your system. The good news is that it's easy. Go to python.org, click on Downloads in the left menu, and download the Python 2.7 Windows installer (or x86-64 installer if you're running a 64-bit system). Install that, and in your normal command prompt, not GitShell (which will do weird things to the paths), run python.
If it's not Python 3, then I'm going to have to think harder.
I have downloaded and installed Python 2.7 and cloned the splunk sdk again with GitHub. Now it gives the error "Splunklib package not found" even though the splunklib folder is present within the sdk.
You either need to install the splunk-sdk using easy_install or pip OR make sure you have PYTHONPATH variable defined pointing to the sdk folder you just cloned. More details on how to install are available at http://dev.splunk.com/view/SP-CAAAEDG.
Let us know if that solves the problem.
Haven't heard back so I am assuming this is no longer an issue. Feel free to open a new issue if you run into more problems or post on Splunkbase.