<?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: How to fix &amp;quot;no module named splunklib&amp;quot; error for python splunk sdk on Windows? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-fix-quot-no-module-named-splunklib-quot-error-for-python/m-p/610146#M212172</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;when i run the command i get an error like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;splunk cmd python sample.py&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;C:\Program Files\Splunk\etc\apps\search\bin&amp;gt;splunk cmd python sample.py&lt;BR /&gt;'splunk' is not recognized as an internal or external command,&lt;BR /&gt;operable program or batch file.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I checked the log using this command&lt;/P&gt;&lt;P&gt;index="_internal" ExecProcessor sourcetype="splunkd" ERROR&lt;/P&gt;&lt;P&gt;shows this error&lt;/P&gt;&lt;P&gt;08-19-2022 23:22:05.955 +0900 ERROR ExecProcessor [3612 ExecProcessor] - message from “”C:\Program Files\Splunk\bin\Python3.exe” “C:\Program Files\Splunk\etc\apps\search\bin\sample.py”" ModuleNotFoundError: No module named ‘splunklib’&lt;BR /&gt;&lt;BR /&gt;08-19-2022 23:22:05.955 +0900 ERROR ExecProcessor [3612 ExecProcessor] - message from ""C:\Program Files\Splunk\bin\Python3.exe" "C:\Program Files\Splunk\etc\apps\search\bin\sample.py"" import splunklib.client as client&lt;BR /&gt;host =WIN-L!Bsource = C:\Program Files\Splunk\var\log\splunk\splunkd.logsourcetype = splunkd&lt;BR /&gt;&lt;BR /&gt;08-19-2022 23:22:05.955 +0900 ERROR ExecProcessor [3612 ExecProcessor] - message from ""C:\Program Files\Splunk\bin\Python3.exe" "C:\Program Files\Splunk\etc\apps\search\bin\sample.py"" Traceback (most recent call last):&lt;BR /&gt;host = WIN-L!Bsource = C:\Program Files\Splunk\var\log\splunk\splunkd.logsourcetype = splunkd&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Aug 2022 15:39:23 GMT</pubDate>
    <dc:creator>rockzers</dc:creator>
    <dc:date>2022-08-19T15:39:23Z</dc:date>
    <item>
      <title>How to fix "no module named splunklib" error for python splunk sdk on Windows?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-fix-quot-no-module-named-splunklib-quot-error-for-python/m-p/610139#M212166</link>
      <description>&lt;P class=""&gt;reated splunk python script and set splunk web on "data input" and added all procedures&lt;/P&gt;&lt;P class=""&gt;but my script is not running in splunk web and i installed python splunk sdk on windows using this command&lt;/P&gt;&lt;PRE&gt;pip install splunk-sdk&lt;/PRE&gt;&lt;P class=""&gt;I've run my code in this folder and verified that it works&lt;/P&gt;&lt;PRE&gt;C:\Program Files\Splunk\etc\apps\search\bin\python sample.py&lt;/PRE&gt;&lt;P class=""&gt;but it doesn't work in Splunk Web.&lt;BR /&gt;How to solve this problem on Windows? Do I need to change any in the Splunk folder path?&lt;/P&gt;&lt;PRE&gt;C:\Program Files\Splunk\etc\apps\search\bin\sample.py&lt;/PRE&gt;&lt;P class=""&gt;any solution solve this problem in splunk windows?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2022 15:01:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-fix-quot-no-module-named-splunklib-quot-error-for-python/m-p/610139#M212166</guid>
      <dc:creator>rockzers</dc:creator>
      <dc:date>2022-08-19T15:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to fix "no module named splunklib" error for python splunk sdk on Windows?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-fix-quot-no-module-named-splunklib-quot-error-for-python/m-p/610143#M212169</link>
      <description>&lt;P&gt;You should test your Python script in the Splunk run-time environment before trying to run it in splunkweb.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;splunk cmd python sample.py&lt;/LI-CODE&gt;&lt;P&gt;Before we can tell you how to solve the problem we first have to know what the problem is.&amp;nbsp; "It doesn't work" is not a problem description.&amp;nbsp; What results do you get and how do those results not meet expectations?&amp;nbsp; What error message(s) do you get?&amp;nbsp; Have you checked python.log?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2022 15:27:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-fix-quot-no-module-named-splunklib-quot-error-for-python/m-p/610143#M212169</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-08-19T15:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to fix "no module named splunklib" error for python splunk sdk on Windows?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-fix-quot-no-module-named-splunklib-quot-error-for-python/m-p/610146#M212172</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;when i run the command i get an error like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;splunk cmd python sample.py&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;C:\Program Files\Splunk\etc\apps\search\bin&amp;gt;splunk cmd python sample.py&lt;BR /&gt;'splunk' is not recognized as an internal or external command,&lt;BR /&gt;operable program or batch file.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I checked the log using this command&lt;/P&gt;&lt;P&gt;index="_internal" ExecProcessor sourcetype="splunkd" ERROR&lt;/P&gt;&lt;P&gt;shows this error&lt;/P&gt;&lt;P&gt;08-19-2022 23:22:05.955 +0900 ERROR ExecProcessor [3612 ExecProcessor] - message from “”C:\Program Files\Splunk\bin\Python3.exe” “C:\Program Files\Splunk\etc\apps\search\bin\sample.py”" ModuleNotFoundError: No module named ‘splunklib’&lt;BR /&gt;&lt;BR /&gt;08-19-2022 23:22:05.955 +0900 ERROR ExecProcessor [3612 ExecProcessor] - message from ""C:\Program Files\Splunk\bin\Python3.exe" "C:\Program Files\Splunk\etc\apps\search\bin\sample.py"" import splunklib.client as client&lt;BR /&gt;host =WIN-L!Bsource = C:\Program Files\Splunk\var\log\splunk\splunkd.logsourcetype = splunkd&lt;BR /&gt;&lt;BR /&gt;08-19-2022 23:22:05.955 +0900 ERROR ExecProcessor [3612 ExecProcessor] - message from ""C:\Program Files\Splunk\bin\Python3.exe" "C:\Program Files\Splunk\etc\apps\search\bin\sample.py"" Traceback (most recent call last):&lt;BR /&gt;host = WIN-L!Bsource = C:\Program Files\Splunk\var\log\splunk\splunkd.logsourcetype = splunkd&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2022 15:39:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-fix-quot-no-module-named-splunklib-quot-error-for-python/m-p/610146#M212172</guid>
      <dc:creator>rockzers</dc:creator>
      <dc:date>2022-08-19T15:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to fix "no module named splunklib" error for python splunk sdk on Windows?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-fix-quot-no-module-named-splunklib-quot-error-for-python/m-p/610153#M212176</link>
      <description>&lt;P&gt;Sorry.&amp;nbsp; On Windows machines, the command is&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;splunk.exe cmd python sample.py&lt;/LI-CODE&gt;&lt;P&gt;The log appears to have identified the problem.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ModuleNotFoundError: No module named ‘splunklib’&lt;/LI-CODE&gt;&lt;P&gt;Did you include splunklib in your app?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2022 16:03:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-fix-quot-no-module-named-splunklib-quot-error-for-python/m-p/610153#M212176</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-08-19T16:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to fix "no module named splunklib" error for python splunk sdk on Windows?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-fix-quot-no-module-named-splunklib-quot-error-for-python/m-p/610159#M212177</link>
      <description>&lt;P&gt;I tried to move the splunklib folder from splunk-sdk-python-master to the bin folder and delete the splunk-sdk-python-master folder&lt;BR /&gt;it's working now&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2022 17:10:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-fix-quot-no-module-named-splunklib-quot-error-for-python/m-p/610159#M212177</guid>
      <dc:creator>rockzers</dc:creator>
      <dc:date>2022-08-19T17:10:34Z</dc:date>
    </item>
  </channel>
</rss>

