<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: splunk sdk for python : splunk.Intersplunk module not found in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/splunk-sdk-for-python-splunk-Intersplunk-module-not-found/m-p/501946#M8995</link>
    <description>&lt;P&gt;You need to use export &lt;STRONG&gt;PYTHONPATH&lt;/STRONG&gt; so that this variable get passed to the child process called (to run &lt;STRONG&gt;program_name&lt;/STRONG&gt;) in your script. Export PYTHONPATH instead just setting it  in .bash_profile.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;export PYTHONPATH=/apps/splunk/etc/apps/splunk-sdk-python
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 28 Mar 2020 09:38:44 GMT</pubDate>
    <dc:creator>manjunathmeti</dc:creator>
    <dc:date>2020-03-28T09:38:44Z</dc:date>
    <item>
      <title>splunk sdk for python : splunk.Intersplunk module not found</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/splunk-sdk-for-python-splunk-Intersplunk-module-not-found/m-p/501945#M8994</link>
      <description>&lt;P&gt;Hi Splunk,&lt;/P&gt;

&lt;P&gt;I'm getting an error after installing splunk sdk for python. The error is:&lt;/P&gt;

&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;
  File "./shelltest.py", line 4, in &lt;BR /&gt;
    import splunk.Intersplunk&lt;BR /&gt;
ImportError: No module named splunk.Intersplunk&lt;/P&gt;

&lt;P&gt;I can see the splunk.Intersplunk module in dir:&lt;BR /&gt;
/apps/splunk/lib/python2.7/site-packages/splunk&lt;/P&gt;

&lt;P&gt;The program is basic:&lt;/P&gt;

&lt;H1&gt;!/usr/bin/env python&lt;/H1&gt;

&lt;P&gt;import sys&lt;BR /&gt;
import subprocess&lt;BR /&gt;
import splunk.Intersplunk&lt;BR /&gt;
cmdargs = str(sys.argv)&lt;BR /&gt;
program_name = "/lm_tmp/yourscript.sh"&lt;BR /&gt;
subprocess.call([program_name, cmdargs])&lt;/P&gt;

&lt;P&gt;PYTHONPATH variable in .bash_profile is:&lt;BR /&gt;
PYTHONPATH=/apps/splunk/etc/apps/splunk-sdk-python&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;NOTE&lt;/STRONG&gt;, if i replace import splunk.Intersplunk with import splunklib the program runs without any issue.&lt;/P&gt;

&lt;P&gt;Is there something wrong with python path? Anyone, been at it for awhile and currently stumped.&lt;/P&gt;

&lt;P&gt;Thx&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:44:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/splunk-sdk-for-python-splunk-Intersplunk-module-not-found/m-p/501945#M8994</guid>
      <dc:creator>brdr</dc:creator>
      <dc:date>2020-09-30T04:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: splunk sdk for python : splunk.Intersplunk module not found</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/splunk-sdk-for-python-splunk-Intersplunk-module-not-found/m-p/501946#M8995</link>
      <description>&lt;P&gt;You need to use export &lt;STRONG&gt;PYTHONPATH&lt;/STRONG&gt; so that this variable get passed to the child process called (to run &lt;STRONG&gt;program_name&lt;/STRONG&gt;) in your script. Export PYTHONPATH instead just setting it  in .bash_profile.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;export PYTHONPATH=/apps/splunk/etc/apps/splunk-sdk-python
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 28 Mar 2020 09:38:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/splunk-sdk-for-python-splunk-Intersplunk-module-not-found/m-p/501946#M8995</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-03-28T09:38:44Z</dc:date>
    </item>
  </channel>
</rss>

