<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Handling python dependencies]]></title><description><![CDATA[<p dir="auto">Hello everyone, Im currently writing an app that uses some python libraries I installed using pip3, everything works on my pc and I would now like to package it using clickable, but I have no idea how I can add those libraries to my build. Any tipps on how to do that? thanks already.</p>
]]></description><link>https://forums.ubports.com/topic/5783/handling-python-dependencies</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 18:03:25 GMT</lastBuildDate><atom:link href="https://forums.ubports.com/topic/5783.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 26 Feb 2021 21:21:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Handling python dependencies on Sat, 27 Feb 2021 23:10:40 GMT]]></title><description><![CDATA[<p dir="auto">Just to explain the solution if someone stumbles across this with the same question:</p>
<p dir="auto">use sys to add "lib/python3.8/site-packages" to path. note that you not need to "../" out of the src directory. The end result  looks like this:</p>
<pre><code>import sys
sys.path.append('lib/python3.8/site-packages')
</code></pre>
<p dir="auto">You might need to change the Python version</p>
]]></description><link>https://forums.ubports.com/post/47336</link><guid isPermaLink="true">https://forums.ubports.com/post/47336</guid><dc:creator><![CDATA[aarontheissueguy]]></dc:creator><pubDate>Sat, 27 Feb 2021 23:10:40 GMT</pubDate></item><item><title><![CDATA[Reply to Handling python dependencies on Sat, 27 Feb 2021 20:04:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/aarontheissueguy" aria-label="Profile: aarontheissueguy">@<bdi>aarontheissueguy</bdi></a> Great news!</p>
]]></description><link>https://forums.ubports.com/post/47325</link><guid isPermaLink="true">https://forums.ubports.com/post/47325</guid><dc:creator><![CDATA[abmyii]]></dc:creator><pubDate>Sat, 27 Feb 2021 20:04:50 GMT</pubDate></item><item><title><![CDATA[Reply to Handling python dependencies on Sat, 27 Feb 2021 19:01:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/abmyii" aria-label="Profile: abmyii">@<bdi>abmyii</bdi></a> I was able to import properly thanks.</p>
]]></description><link>https://forums.ubports.com/post/47319</link><guid isPermaLink="true">https://forums.ubports.com/post/47319</guid><dc:creator><![CDATA[aarontheissueguy]]></dc:creator><pubDate>Sat, 27 Feb 2021 19:01:08 GMT</pubDate></item><item><title><![CDATA[Reply to Handling python dependencies on Sat, 27 Feb 2021 13:28:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/aarontheissueguy" aria-label="Profile: aarontheissueguy">@<bdi>aarontheissueguy</bdi></a> I see. So I think the problem here is that the libs are in the <code>lib/Python3.8</code> folder as opposed to directly in the <code>lib/</code> folder. Try either moving them into the <code>lib/</code> folder or adding <code>lib/Python3.8</code> to <code>sys.path</code>.</p>
]]></description><link>https://forums.ubports.com/post/47313</link><guid isPermaLink="true">https://forums.ubports.com/post/47313</guid><dc:creator><![CDATA[abmyii]]></dc:creator><pubDate>Sat, 27 Feb 2021 13:28:26 GMT</pubDate></item><item><title><![CDATA[Reply to Handling python dependencies on Sat, 27 Feb 2021 12:27:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/abmyii" aria-label="Profile: abmyii">@<bdi>abmyii</bdi></a> I uploaded the code on GH <a href="https://github.com/Aarontheissueguy/AGem" rel="nofollow ugc">https://github.com/Aarontheissueguy/AGem</a> its a frontend for the python gemini client Agunua.</p>
]]></description><link>https://forums.ubports.com/post/47310</link><guid isPermaLink="true">https://forums.ubports.com/post/47310</guid><dc:creator><![CDATA[aarontheissueguy]]></dc:creator><pubDate>Sat, 27 Feb 2021 12:27:53 GMT</pubDate></item><item><title><![CDATA[Reply to Handling python dependencies on Sat, 27 Feb 2021 12:03:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/aarontheissueguy" aria-label="Profile: aarontheissueguy">@<bdi>aarontheissueguy</bdi></a> Do you have the project hosted online? It's a bit difficult to debug without understanding the structure. If it's not hosted online, running <code>tree</code> should be enough for me to get an idea of the structure.</p>
]]></description><link>https://forums.ubports.com/post/47308</link><guid isPermaLink="true">https://forums.ubports.com/post/47308</guid><dc:creator><![CDATA[abmyii]]></dc:creator><pubDate>Sat, 27 Feb 2021 12:03:15 GMT</pubDate></item><item><title><![CDATA[Reply to Handling python dependencies on Sat, 27 Feb 2021 11:08:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/abmyii" aria-label="Profile: abmyii">@<bdi>abmyii</bdi></a> Thank you for the response. Yes I am working in a virtual environment. I added the lib and bin folder to the CmakeList and added them to path like this in Python:</p>
<pre><code>import sys
sys.path.append('../bin')
sys.path.append('../lib')
import Agunua
from io import StringIO
import io
</code></pre>
<p dir="auto">This still results in an error if I run clickable desktop though</p>
]]></description><link>https://forums.ubports.com/post/47303</link><guid isPermaLink="true">https://forums.ubports.com/post/47303</guid><dc:creator><![CDATA[aarontheissueguy]]></dc:creator><pubDate>Sat, 27 Feb 2021 11:08:05 GMT</pubDate></item><item><title><![CDATA[Reply to Handling python dependencies on Sat, 27 Feb 2021 09:53:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/aarontheissueguy" aria-label="Profile: aarontheissueguy">@<bdi>aarontheissueguy</bdi></a> There are a few ways - all include copying the modules into the package. This should be very easy if you are using a virutalenv, because ideally all the packages required are installed in it (and hopefully no others, because that would be a bit of a waste of space).</p>
<p dir="auto">The simplest way is to copy all the folders into the main package folder (i.e. in the same folder as the Python files) since Python will automatically look for the modules in that folder, so it should find them. Note that any modules that have binary files that are specific to one arch will fail on the other arches.</p>
<p dir="auto">Another method is to use the <code>PYTHONPATH</code> (<a href="https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH" rel="nofollow ugc">https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH</a>) environment variable to point to the folder containing the modules. This can also be done in Python by adding the following to the top of your Python files:</p>
<pre><code>import sys
sys.path.append('&lt;PATH&gt;')
</code></pre>
<p dir="auto">This will make Python look for the modules in the provided path.</p>
]]></description><link>https://forums.ubports.com/post/47298</link><guid isPermaLink="true">https://forums.ubports.com/post/47298</guid><dc:creator><![CDATA[abmyii]]></dc:creator><pubDate>Sat, 27 Feb 2021 09:53:45 GMT</pubDate></item></channel></rss>