ExifTool Forum

ExifTool => Developers => Topic started by: bhuish on September 07, 2016, 03:46:49 PM

Title: stand Alone MAC app using python
Post by: bhuish on September 07, 2016, 03:46:49 PM
I developed a Python script using exiftool (pyexiftool) and it works great but when I try to create the standalone mac app I get the following error, "ImportError: No module named exiftool".   The python script works great from the terminal window on my mac.  I am using py2app to build the stand-alone app.  The build directory is created as is the dist directory but when I try to run the app from terminal I get the error.  What do I need to do to get this thing to recognize where exiftool is hiding on my mac??? .  When I open the Contents of the dist dir I can see the Python library but the exiftool library is nowhere to be found in either resources or lib.   Help...  I suspect there is an easy fix but it is baffling me..... The import in the Python script is   "import exiftool"  and it works fine when just running the python script.   Thanks
Title: Re: stand Alone MAC app using python
Post by: Phil Harvey on September 08, 2016, 07:24:26 AM
The ImportError is a Python error, so it isn't finding the pyexiftool module.  Likely the Python include directories are different when you create a standalone app.  I don't know Python so I can't help much here, but you should be able to figure this out with a bit of googling.  Maybe as simple as "import /path/to/exiftool"?

- Phil
Title: Re: stand Alone MAC app using python
Post by: bhuish on September 08, 2016, 08:01:13 AM
Thanks for your thoughts. My thought as well.  I was going to try this but I can't seem to find the path to pyexiftool.  Apparently these paths are a mystic secret in a Mac, buried in invisible directories.  If anybody can provide the Mac pathway to pyexiftool on Mac I would be very appreciative.  Once I have that I face the daunting syntax perils.  :-\
Thanks
Title: Re: stand Alone MAC app using python
Post by: bhuish on September 13, 2016, 04:01:03 PM
OK.... I got it to accept exiftool by putting exiftool the executable (MAC) in the directory where everything lives.  It works fine but when I try to build a stand alone using py2app it cannot find pyexiftool / exiftool again.  The script works fine, the alias from Py2app works fine but the full compile keeps giving me file or directory no found... help
Title: Re: stand Alone MAC app using python
Post by: Stephen Marsh on September 23, 2016, 03:18:01 AM
https://exiftool.org/forum/index.php/topic,7576.0.html