<?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: Getting error 'No module named Crypto.Cipher' in Python script in Installation</title>
    <link>https://community.splunk.com/t5/Installation/Getting-error-No-module-named-Crypto-Cipher-in-Python-script/m-p/456332#M8646</link>
    <description>&lt;P&gt;Splunk has its own Python executable and libraries. &lt;BR /&gt;
If you are using custom libs you need to copy these into your application's /bin directory so the Splunk Python can load them&lt;/P&gt;</description>
    <pubDate>Tue, 26 Mar 2019 14:38:10 GMT</pubDate>
    <dc:creator>nickhills</dc:creator>
    <dc:date>2019-03-26T14:38:10Z</dc:date>
    <item>
      <title>Getting error 'No module named Crypto.Cipher' in Python script</title>
      <link>https://community.splunk.com/t5/Installation/Getting-error-No-module-named-Crypto-Cipher-in-Python-script/m-p/456331#M8645</link>
      <description>&lt;P&gt;I have created a custom alert action which calls a Python script. The script uses Crypto.Cipher library to encrypt/decrypt sting data.&lt;/P&gt;

&lt;P&gt;When I run the script from Spyder IDE, it works fine and returns expected result. However, when the same script runs from Splunk it gives below error&lt;/P&gt;

&lt;P&gt;03-26-2019 13:06:02.949 +0000 ERROR sendmodalert - action=test STDERR -  Traceback (most recent call last):&lt;BR /&gt;
03-26-2019 13:06:02.949 +0000 ERROR sendmodalert - action=test STDERR -    File "F:\Program Files\Splunk\etc\apps\alert_test\bin\test.py", line 5, in &lt;BR /&gt;
03-26-2019 13:06:02.949 +0000 ERROR sendmodalert - action=test STDERR -      from Crypto.Cipher import AES&lt;BR /&gt;
03-26-2019 13:06:02.949 +0000 ERROR sendmodalert - action=test STDERR -  ImportError: No module named Crypto.Cipher&lt;BR /&gt;
03-26-2019 13:06:03.205 +0000 INFO  sendmodalert - action=test - Alert action script completed in duration=778 ms with exit code=1&lt;BR /&gt;
03-26-2019 13:06:03.205 +0000 WARN  sendmodalert - action=test - Alert action script returned error code=1&lt;/P&gt;

&lt;P&gt;I have below code in the python script &lt;/P&gt;

&lt;P&gt;from Crypto.Cipher import AES&lt;BR /&gt;
import base64&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2019 13:12:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Getting-error-No-module-named-Crypto-Cipher-in-Python-script/m-p/456331#M8645</guid>
      <dc:creator>santosh_sshanbh</dc:creator>
      <dc:date>2019-03-26T13:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error 'No module named Crypto.Cipher' in Python script</title>
      <link>https://community.splunk.com/t5/Installation/Getting-error-No-module-named-Crypto-Cipher-in-Python-script/m-p/456332#M8646</link>
      <description>&lt;P&gt;Splunk has its own Python executable and libraries. &lt;BR /&gt;
If you are using custom libs you need to copy these into your application's /bin directory so the Splunk Python can load them&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2019 14:38:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Getting-error-No-module-named-Crypto-Cipher-in-Python-script/m-p/456332#M8646</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2019-03-26T14:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error 'No module named Crypto.Cipher' in Python script</title>
      <link>https://community.splunk.com/t5/Installation/Getting-error-No-module-named-Crypto-Cipher-in-Python-script/m-p/456333#M8647</link>
      <description>&lt;P&gt;I am using pycrypto library which can be downloaded from &lt;A href="https://www.dlitz.net/software/pycrypto/"&gt;https://www.dlitz.net/software/pycrypto/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;However, the download contains multiple files, directories. Do I need to keep all of them in my custom apps bin directory?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 06:18:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Installation/Getting-error-No-module-named-Crypto-Cipher-in-Python-script/m-p/456333#M8647</guid>
      <dc:creator>santosh_sshanbh</dc:creator>
      <dc:date>2019-03-27T06:18:41Z</dc:date>
    </item>
  </channel>
</rss>

