sortphotos unable to locate exiftool
willtm opened this issue · comments
Hello,
First of all, thank you for taking the time to develop and share sortphotos.py
. I really appreciate its simplicity. That it's a python program makes it that much easier to use across a few different OSX and Linux machines I have.
I'm having trouble using the newest version. Prior to the most recent version, I was able to use sortphotos.py
to organize image files using the default settings. I noticed yesterday that you updated the program to use Exiftool, so I installed it on my machine running OSX 10.10. I confirmed that exiftool was located in /usr/bin/exiftool
and used it to obtain metadata from an image file.
Next I tried using sortphotos:
python sortphotos.py ~/Desktop/wedding\ photos/ ~/Desktop/test/
I got the following error messge:
Can't locate Image/ExifTool.pm in @INC (you may need to install the Image::ExifTool module) (@INC contains: Image-ExifTool/lib /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at Image-ExifTool/exiftool line 30. BEGIN failed--compilation aborted at Image-ExifTool/exiftool line 30. Traceback (most recent call last): File "sortphotos.py", line 150, in <module> args.recursive, args.copy, not args.silent, args.test) File "sortphotos.py", line 108, in sortPhotos e.execute(*args) File "sortphotos.py", line 29, in __exit__ self.process.stdin.write("-stay_open\nFalse\n") IOError: [Errno 32] Broken pipe
It appears to be looking for exiftool or exiftool components. But I've already confirmed that it's available to a regular user and that it works. Can you advise me on how to troubleshoot this? If this is a question that is better directed to exiftool forums, I apologize. But because I've had no trouble with exiftool as such, I thought it might best to try here first.
I think it's not looking for /usr/bin/exiftool, but for the ExifTool python package, which is included in this repo.
@anilgulecha thank you! That makes sense, since it's included with the repo. However, I've run into issues with the installation of the full "perl" version of ExifTool on OSX 10.10 (as opposed to the .dmg-based installation). After downloading the most recent version (9.76) the installation guide recommends the following steps:
cd ~/Desktop
tar -xzf Image-ExifTool-#.##.tar.gz
cd Image-ExifTool-#.##
sudo cp -r exiftool lib /usr/bin
These were all successful, and I was able to confirm that exiftool
is installed in /usr/bin
. So far, so good. But then I attempted to install the ExifTool python package, which advises the following:
perl Makefile.PL
make
make test
make install
After attempting to run perl Makefile.PL
I got the following error:
Checking if your kit is complete...
Warning: the following files are missing in your kit:
lib/File/RandomAccess.pm...
...lib/Image/ExifTool/ZIP.pm
Please inform the author.
Could not open 'lib/Image/ExifTool.pm': No such file or directory at /opt/local/lib/perl5/5.16.3/ExtUtils/MM_Unix.pm line 2636.
Do you have any advice on how to proceed? Again, maybe I should be asking at the Exiftool forums so please forgive me if that's the case. I do appreciate your help.
You shouldn't need to install anything. It's a perl library. Just keep the same directory structure I have in the repo. You only need to "install" if you want it to be available to other applications.
On Fri, Nov 21, 2014 at 10:24 AM, willtmonroe notifications@github.com
wrote:
@anilgulecha thank you! That makes sense, since it's included with the repo. However, I've run into issues with the installation of the full "perl" version of ExifTool on OSX 10.10 (as opposed to the .dmg-based installation). After downloading the most recent version (9.76) the installation guide recommends the following steps:
cd ~/Desktop tar -xzf Image-ExifTool-#.##.tar.gz cd Image-ExifTool-#.## sudo cp -r exiftool lib /usr/bin
These were all successful, and I was able to confirm thatexiftool
is installed in/usr/bin
. So far, so good. But then I attempted to install the ExifTool pythong package, which advises the following:
perl Makefile.PL make make test make install
After attempting to runperl Makefile.PL
I got the following error:
Checking if your kit is complete... Warning: the following files are missing in your kit: lib/File/RandomAccess.pm... ...lib/Image/ExifTool/ZIP.pm Please inform the author. Could not open 'lib/Image/ExifTool.pm': No such file or directory at /opt/local/lib/perl5/5.16.3/ExtUtils/MM_Unix.pm line 2636.
Do you have any advice on how to proceed? Again, maybe I should be asking at the Exiftool forums so please forgive me if that's the case. I do appreciate your help.
Reply to this email directly or view it on GitHub:
#25 (comment)
@andrewning thanks for the reply! I've got the repo downloaded and with a directory structure identical to the one in the repo. But I'm still getting the same error:
wmonro1-1:src wmonro1$ python sortphotos.py ~/Desktop/source/ ~/Desktop/destination/
Can't locate Image/ExifTool.pm in @INC (you may need to install the Image::ExifTool module) (@INC contains: Image-ExifTool/lib /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at Image-ExifTool/exiftool line 30.
BEGIN failed--compilation aborted at Image-ExifTool/exiftool line 30.
Traceback (most recent call last):
File "sortphotos.py", line 150, in <module>
args.recursive, args.copy, not args.silent, args.test)
File "sortphotos.py", line 108, in sortPhotos
e.execute(*args)
File "sortphotos.py", line 29, in __exit__
self.process.stdin.write("-stay_open\nFalse\n")
IOError: [Errno 32] Broken pipe
I'm sure I'm missing something simple but I've no idea what it is. If you have any troubleshooting advice, I'd appreciate it.
UPDATE
So, this was far easier than I realized. The version of ExifTool that was included with the sortphotos repo did not include the lib
directory provided by the "full PERL version", available here: http://www.sno.phy.queensu.ca/~phil/exiftool/. Once I downloaded that version and extracted its contents within the sortphotos
repo directory where the old ExifTool directory was, I was able to successfully install ExifTool following the steps below:
perl Makefile.PL
make
make test
make install
After that, it was simple to run sortphoto.py on a small batch of images. Can't believe I overlooked this. Perhaps it works without the lib
directory on other systems but on OSX 10.10, I needed it.
I left out the lib file on accident. Normally those directories are ignored in my gitignore file but I added the exception and if you pull the latest it should work.
I pulled the latest version of the repository and I'm getting this same error (Can't locate Image/ExifTool/ISO.pm in @inc (you may need to install the Image::ExifTool::ISO module). I'm working in the same directory as sortphotos.py and the exif folder has the lib folder as well. Not sure what could be causing this problem but I'm running this on Ubuntu 20.04 with the latest version of perl 5.30