tag:infinitekind.tenderapp.com,2009-01-14:/discussions/moneydance-development/1704-python-package-install-best-practiceInfinite Kind: Discussion 2018-10-18T14:07:21Ztag:infinitekind.tenderapp.com,2009-01-14:Comment/412361392016-11-16T02:13:30Z2016-11-16T02:13:33ZPython package install best practice?<div><p>Hi. I'm trying to add a few scripts in python to my MD2017 and
I'm wondering what's the best way to install PyPI packages such
that they are picked up by the built in Python runner.</p>
<p>Right now I'm kind of hacking it by pip installing into a
virtual environment and then manually adding the venv site-packages
directory to sys.path before my import statements. Any way I can
directly install packages into the MD install?</p></div>viranthatag:infinitekind.tenderapp.com,2009-01-14:Comment/412361392016-11-16T17:03:30Z2016-11-16T17:03:33ZPython package install best practice?<div><p>Also, does the python runner in MD2017 have any known
limitations with the number of files? For example, if my main file
imports another local file (say a script instantiating a swing
JFrame), I find that reinstalling the extension does not pick up
any changes in any imported file. Kind of annoying to have to put
all my code into the single file that gets run. Is there any way to
force a 'recompile' of all the imports when running a script? I've
verified that the file timestamps are new.</p></div>viranthatag:infinitekind.tenderapp.com,2009-01-14:Comment/412361392016-11-29T19:07:22Z2016-11-29T19:07:23ZPython package install best practice?<div><p>Ok, so just to answer my own question immediately above where MD
was not re-importing imports during development, the work-around is
to reload(module).</p>
<pre>
<code>import my_module
reload(my_module)</code>
</pre></div>virantha