<h2>解决方案</h2>
<p>我看到了<a href="http://blog.mbedded.ninja/programming/embedded-linux/yocto-project/developing-and-remote-debugging-python-app-on-yocto-linux-build" rel="nofollow noreferrer">This particular blogpost</a>的一个小片段,其中提到在<code>INSTALL_IMAGE_append</code>中使用<code>python-modules</code>。在</p>
<p>在看过问题中提到的<code>python-3.5-manifest.inc</code>文件之后,我发现{<cd4>}将为我的应用程序提供运行所需的所有基本模块。在</p>
<h2>试验</h2>
<p>因此,在<code>local.conf</code>文件中,我添加了<code>IMAGE_INSTALL_appends = " python3-modules"</code>,并在硬件上加载了映像。这件事做得很好。在</p>
<p>现在在python3shell中,我没有收到任何<code>datetime</code>模块错误。在</p>
<h2>现在是<code>local.conf</code>的代码段</h2>
<pre><code>IMAGE_INSTALL_append = " python3-modules influxdb-python pynmea2 pyserial"
</code></pre>
<p>这个很好用。在</p>
<h3>p、 s.</h3>
<p>我现在不确定我是否应该在<code>RDEPENDS_${PN}</code>中添加<code>${PYTHON_PN}-modules</code>作为<code>influxdb-python</code>和{<cd12>}的配方。在</p>
<h3>更新</h3>
<p>我更新了<a href="https://gist.github.com/shantanoo-desai/fc00836d399f8592a30efe1ec9c56213" rel="nofollow noreferrer">GitHub gists</a>,它现在在<code>RDEPENDS</code>中添加了<code>${PYTHON_PN}-modules</code>,它在板上工作。在</p>
<h2>退税</h2>
<p>据我所知,添加<code>python3-modules</code>会增加映像占用空间,因为它需要在rootfs中添加很多模块。但这些模块似乎对运行多种类型的应用程序很重要,因此它也有好处。在</p>