<?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 Re: JMP 18 creating exe from python code using pyinstaller in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JMP-18-creating-exe-from-python-code-using-pyinstaller/m-p/773867#M95526</link>
    <description>&lt;P&gt;Thanks Jarmo for the response. Is there any way (via addin maybe?) to share an application without needing to install all the python packages in the end-user JMP18?&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jul 2024 13:21:25 GMT</pubDate>
    <dc:creator>Zach_Eyde</dc:creator>
    <dc:date>2024-07-18T13:21:25Z</dc:date>
    <item>
      <title>JMP 18 creating exe from python code using pyinstaller</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-18-creating-exe-from-python-code-using-pyinstaller/m-p/773733#M95507</link>
      <description>&lt;P&gt;All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I havent seen this question asked, but if I make an application using JMP 18 embedded python, can I leverage Pyinstaller to make an executable so other user can also use the application without needing JMP18 or installing all the python packages?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 22:44:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-18-creating-exe-from-python-code-using-pyinstaller/m-p/773733#M95507</guid>
      <dc:creator>Zach_Eyde</dc:creator>
      <dc:date>2024-07-17T22:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: JMP 18 creating exe from python code using pyinstaller</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-18-creating-exe-from-python-code-using-pyinstaller/m-p/773782#M95513</link>
      <description>&lt;P&gt;It might be possible but you wouldn't be able to use any of the JMP features that way (jmp package or anything it offers) and in that case I would just create a separate virtual environment for that code and manage it that way (so run Python outside of JMP).&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 04:49:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-18-creating-exe-from-python-code-using-pyinstaller/m-p/773782#M95513</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-07-18T04:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: JMP 18 creating exe from python code using pyinstaller</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-18-creating-exe-from-python-code-using-pyinstaller/m-p/773867#M95526</link>
      <description>&lt;P&gt;Thanks Jarmo for the response. Is there any way (via addin maybe?) to share an application without needing to install all the python packages in the end-user JMP18?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 13:21:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-18-creating-exe-from-python-code-using-pyinstaller/m-p/773867#M95526</guid>
      <dc:creator>Zach_Eyde</dc:creator>
      <dc:date>2024-07-18T13:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: JMP 18 creating exe from python code using pyinstaller</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-18-creating-exe-from-python-code-using-pyinstaller/m-p/773969#M95545</link>
      <description>&lt;P&gt;Even with a normal standalone Python environment, you need for the user to install packages that your code will depend on. &amp;nbsp;Your scripts can install the packages using either Python or JSL. See the scripting Index for documentation of JSL's &lt;STRONG&gt;Python Install Packages( )&lt;/STRONG&gt;, and&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;import jmputils&lt;/STRONG&gt;&lt;/EM&gt;'s &lt;STRONG&gt;jpip()&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can wrap the import statement with a try: except: block to catch the error if an import fails, and in the except: block do the jmputils.jpip() install of the package. &amp;nbsp;&lt;EM&gt;But remember at this point Python already tried, so in the except block after the install you will also need importlib and make a reload() on of the import module&amp;nbsp;&lt;/EM&gt;&lt;I&gt;in question.&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe the best way is to create a real Python package for your Python code, complete with a project.toml file that sets up all the dependencies so that you can then do a jpip('install', 'your_package') &amp;nbsp; Host that on PyPi, your own repository or just a path in your filesystem to the package. &amp;nbsp;See regular Python packaging guidelines on how to create Python packages. Then pip,&amp;nbsp;&lt;EM&gt;via jpip,&lt;/EM&gt; takes care of pulling in all of the dependencies.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 19:36:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-18-creating-exe-from-python-code-using-pyinstaller/m-p/773969#M95545</guid>
      <dc:creator>Paul_Nelson</dc:creator>
      <dc:date>2024-07-18T19:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: JMP 18 creating exe from python code using pyinstaller</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-18-creating-exe-from-python-code-using-pyinstaller/m-p/773970#M95546</link>
      <description>&lt;P&gt;Python's importlib has all kinds of capabilities available see the Python documentation on importlib.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.python.org/3.11/library/importlib.html" target="_blank"&gt;https://docs.python.org/3.11/library/importlib.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 19:41:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-18-creating-exe-from-python-code-using-pyinstaller/m-p/773970#M95546</guid>
      <dc:creator>Paul_Nelson</dc:creator>
      <dc:date>2024-07-18T19:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: JMP 18 creating exe from python code using pyinstaller</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-18-creating-exe-from-python-code-using-pyinstaller/m-p/775488#M95768</link>
      <description>&lt;P&gt;Hey Paul,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I can use python package pipreqs to create a requirements.txt for only the packages used in the application. Then I should be able to "jpip pip install -r requirements.txt" to installed all required packages. 1 question for you:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you add a jpip.bat file to the addin additional files, move to the JMP 18 directory path to utilize jpip function or do i need to create each users individual jpip.bat file on the end-user machine.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 19:48:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-18-creating-exe-from-python-code-using-pyinstaller/m-p/775488#M95768</guid>
      <dc:creator>Zach_Eyde</dc:creator>
      <dc:date>2024-07-25T19:48:00Z</dc:date>
    </item>
  </channel>
</rss>

