<?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 Yocto-ModuleNotFoundError: No module named 'Crypto' in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Yocto-ModuleNotFoundError-No-module-named-Crypto/m-p/1349954#M181006</link>
    <description>&lt;P&gt;Hello Community&lt;/P&gt;&lt;P&gt;I am getting one issue&amp;nbsp; in yocto&lt;/P&gt;&lt;P&gt;I am trying to execute a python script from inside&lt;/P&gt;&lt;P&gt;IMAGE_CMD_tar_append (){&lt;/P&gt;&lt;P&gt;python3 myscript.py&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;getting following errors&lt;/P&gt;&lt;P&gt;from Crypto.PublicKey import RSA&lt;BR /&gt;| ModuleNotFoundError: No module named 'Crypto'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but if I try same command from command line it works&lt;/P&gt;&lt;P&gt;Please guide!&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 04 Oct 2021 09:28:48 GMT</pubDate>
    <dc:creator>sd05</dc:creator>
    <dc:date>2021-10-04T09:28:48Z</dc:date>
    <item>
      <title>Yocto-ModuleNotFoundError: No module named 'Crypto'</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Yocto-ModuleNotFoundError-No-module-named-Crypto/m-p/1349954#M181006</link>
      <description>&lt;P&gt;Hello Community&lt;/P&gt;&lt;P&gt;I am getting one issue&amp;nbsp; in yocto&lt;/P&gt;&lt;P&gt;I am trying to execute a python script from inside&lt;/P&gt;&lt;P&gt;IMAGE_CMD_tar_append (){&lt;/P&gt;&lt;P&gt;python3 myscript.py&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;getting following errors&lt;/P&gt;&lt;P&gt;from Crypto.PublicKey import RSA&lt;BR /&gt;| ModuleNotFoundError: No module named 'Crypto'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but if I try same command from command line it works&lt;/P&gt;&lt;P&gt;Please guide!&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 09:28:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Yocto-ModuleNotFoundError-No-module-named-Crypto/m-p/1349954#M181006</guid>
      <dc:creator>sd05</dc:creator>
      <dc:date>2021-10-04T09:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Yocto-ModuleNotFoundError: No module named 'Crypto'</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Yocto-ModuleNotFoundError-No-module-named-Crypto/m-p/1350668#M181070</link>
      <description>&lt;P&gt;Hello sd05,&lt;/P&gt;
&lt;P&gt;For python3 the package name is now&amp;nbsp;&lt;EM&gt;pycryptodome&lt;/EM&gt;&amp;nbsp;or&amp;nbsp;&lt;EM&gt;pycryptodomex&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;If you need compatibility with your project with&amp;nbsp;&lt;EM&gt;Python2&lt;/EM&gt;&amp;nbsp;use&amp;nbsp;&lt;EM&gt;pycryptodome&lt;/EM&gt;&amp;nbsp;or else use&amp;nbsp;&lt;EM&gt;pycryptodomex&lt;/EM&gt;&amp;nbsp;which is a library independent of the old PyCrypto.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 13:58:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Yocto-ModuleNotFoundError-No-module-named-Crypto/m-p/1350668#M181070</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2021-10-05T13:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: Yocto-ModuleNotFoundError: No module named 'Crypto'</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Yocto-ModuleNotFoundError-No-module-named-Crypto/m-p/1538392#M196427</link>
      <description>&lt;P&gt;To make it short, it means that you lacked some "dependencies" for the libraries you wanted to use. This is a common problem when installing python packages, mainly in windows. Before trying to use any kind of library, first it is suggested to look up whether it needs another library in python "family".&lt;/P&gt;&lt;P&gt;The solution is to provide the python interpreter with the path-to-your-module/library. The simplest solution is to append that &lt;A href="http://net-informations.com/python/intro/path.htm" target="_self"&gt;python path&lt;/A&gt; to your sys.path list. In your notebook, first try:&lt;/P&gt;&lt;P&gt;import sys&lt;BR /&gt;sys.path.append('my/path/to/module/folder')&lt;/P&gt;&lt;P&gt;This isn't a permanent change in sys.path, because when you log out, your environment is reset, so any variables you may have set are lost.&lt;/P&gt;&lt;P&gt;The better (and more permanent) way to solve this is to set your PYTHONPATH, which provides the interpreter with additional directories look in for python packages/modules.&lt;/P&gt;&lt;P&gt;from BASH type: export PYTHONPATH=/path/to/new/folder:/another/path/...../&lt;/P&gt;&lt;P&gt;#each path must be separated by a colon&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 07:58:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Yocto-ModuleNotFoundError-No-module-named-Crypto/m-p/1538392#M196427</guid>
      <dc:creator>gilbertcane</dc:creator>
      <dc:date>2022-10-17T07:58:03Z</dc:date>
    </item>
  </channel>
</rss>

