Thank you Richard for the answer. I'll see what i can cook up. <br><br><div id="ymail_android_signature"><a id="ymail_android_signature_link" href="https://go.onelink.me/107872968?pid=InProduct&c=Global_Internal_YGrowth_AndroidEmailSig__AndroidUsers&af_wl=ym&af_sub1=Internal&af_sub2=Global_YGrowth&af_sub3=EmailSignature">Sent from Yahoo Mail on Android</a></div> <br> <blockquote style="margin: 0 0 20px 0;"> <div style="font-family:Roboto, sans-serif; color:#6D00F6;"> <div>On Wed, Apr 20, 2022 at 8:11 PM, Richard Duivenvoorde via Qgis-user</div><div><qgis-user@lists.osgeo.org> wrote:</div> </div> <div style="padding: 10px 0 0 20px; margin: 10px 0 0 0; border-left: 1px solid #6D00F6;"> Hi,<br clear="none"><br clear="none">if you would ask me, I'd advice:<br clear="none">- small (python) modules? Add a copy in your plugin<br clear="none">- others: instruct users to install them (depending on OS this is more or less difficult)<br clear="none"><br clear="none">Your methods all need some 'magic' to happen, which will probably break, but feel free to try.<br clear="none"><br clear="none">Regards,<br clear="none"><br clear="none">Richard Duivenvoorde<br clear="none"><br clear="none">On 4/19/22 23:08, nagyrobi_r--- via Qgis-user wrote:<br clear="none">> Hei everybody!<br clear="none">> <br clear="none">> I am trying to develop a QGIS plugin, and the plugin requires python modules that are not present in the basic QGIS python install. Since i want these packages to install for users that might wish to use the plugin, what method would be the correct one to install the dependencies? I am thinking that some users might have multiple python installs at once, multiple pythonpaths etc.<br clear="none">> <br clear="none">> 1. Method using setup.py when installing the module. But how would that run? or when would it run? Very open for suggestions here.<br clear="none">> 2. Using subprocess with a try and except clause: prone for errors, since any python instance might be called :<br clear="none">>      import sys<br clear="none">>      import subprocess<br clear="none">> <br clear="none">>      # implement pip as a subprocess:<br clear="none">>      subprocess.check_call(['python', '-m', 'pip', 'install',<br clear="none">>      '<packagename>'])<br clear="none">> 3. Using pip.main, which seems to warn about a deprecation possibilities for the future<br clear="none">> import pip<br clear="none">> pip.main(['install', package])<br clear="none">> <br clear="none">> Method 1 could run one time at the plugin install, whilst methods 2 and 3 would run at every plugin load.<br clear="none">> How do you go about adding dependencies to your package?<br clear="none">> <br clear="none">> Kind regards,<br clear="none">> Robert Nagy<br clear="none">> <br clear="none">> <br clear="none">> _______________________________________________<br clear="none">> Qgis-user mailing list<br clear="none">> <a shape="rect" ymailto="mailto:Qgis-user@lists.osgeo.org" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br clear="none">> List info: <a shape="rect" href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br clear="none">> Unsubscribe: <a shape="rect" href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><div class="yqt9931626278" id="yqtfd89950"><br clear="none"><br clear="none">_______________________________________________<br clear="none">Qgis-user mailing list<br clear="none"><a shape="rect" ymailto="mailto:Qgis-user@lists.osgeo.org" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br clear="none">List info: <a shape="rect" href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br clear="none">Unsubscribe: <a shape="rect" href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br clear="none"></div> </div> </blockquote>