Hi Adam,

Have you tried installing pyinstaller, and its dependencies, into the ArcGIS 
python and then using the ArcGIS python to build the executable. This should at 
least install the correct python interpreter into the exe bundle. You could 
then set the import path to the ArcGIS installation folder or folders. Might 
work!

Steve

From: [email protected] <[email protected]> On Behalf Of 
Adam Fackler
Sent: Wednesday, March 6, 2024 11:11 PM
To: PyInstaller <[email protected]>
Subject: [PyInstaller] Set interpreter when creating executable


Hello all,

I built out a python script that utilizes a python library called ArcPy which 
is part of the ArcGIS Pro Desktop program. To run a script using this python 
library, I must run the script using the python interpreter found in the ArcGIS 
Pro folder structure, in this case the default being at "C:\Program 
Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe". I have been able to 
run it outside of the program as intended without issues by setting the 
interpreter to the above path, however I would like to push this script out as 
an executable. My clients are not tech savy firefighters and I want to make it 
as easy as humanly possible to "deploy" this tool on their computers and have 
this independent tool to do the needed data transformation. I will note that 
they WILL have ArcGIS Pro installed already on their computers (even if they 
don't know how to use it), so they will have the interpreter installed in the 
same default location.

I have been looking into using Pyinstaller to make the tool into an exe file so 
that they can click on the icon to open the program, get the GUI (all in 
tkinter) to input the data, and run the tool. The issue I have ran into is that 
Pyinstaller uses the default python interpreter and not the one I need it to, 
therefore the ArcPy library isn't brought in and the program explodes on the 
launch pad. So is there a way to tell Pyinstaller to "use this interpreter when 
running this python script"?

I know I can use a batch file to run the script using the interpreter, but that 
could be problematic with distributing the script out to them. Once again, the 
less files less buttons that need to be clicked, and the more graphicly 
enhanced (like an icon on the shortcut) the better, that's why I'm going the 
executable route.
--
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/ad961cca-9902-42d0-bcd0-a6447c25c855n%40googlegroups.com<https://groups.google.com/d/msgid/pyinstaller/ad961cca-9902-42d0-bcd0-a6447c25c855n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/DU0P194MB1819432A2018078ED6EE2B019B202%40DU0P194MB1819.EURP194.PROD.OUTLOOK.COM.

Reply via email to