[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Python 3.73 cannot install py3exiv2

On 5/1/2019 9:12 AM, Ken Martell wrote:
> I?m a retired aerospace engineer. I?m a Windows 10 user & have zero experience with Python. My goal is to learn, get this working & run lens distortion correction routines using Python. I?ve tried or many hours and read as much as I can but cannot get the py3exiv2 module to install. Other needed modules installed fine. It appears the Python version 2 of evix2 is needed as a dependent for the version 3 but neither pip or pip3 will install old or new. 

I don't believe that this is the case.  exiv2 is a C++ library. 
'pyexiv2' is a python 2 wrapper that makes it accessible from python 
2.7. 'py3exiv2' is an python 3 wrapper based on pyexiv2, but it should 
be independent of pyexiv2.  https://pypi.org/project/py3exiv2/

Sorry for taking your time but I?m a newbie just trying to help my 
fellow photographers correct  lens distortion problems in 
post-processing as well as my own.
> Any help much appreciated!
> Thank you
> Ken Martell
> This is the error I get :
> D:\>pip3 install py3exiv2
> Collecting py3exiv2
>  ? Using cached https://files.pythonhosted.org/packages/eb/c4/675823a2c23d8f138e7dc2b7574d09f26959f641d0b59c3ec7faa65764e5/py3exiv2-0.7.0.tar.gz
> Installing collected packages: py3exiv2
>  ? Running setup.py install for py3exiv2 ... error
>  ??? Complete output from command d:\apps\python37\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Ken\\AppData\\Local\\Temp\\pip-install-swqqye4_\\py3exiv2\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Ken\AppData\Local\Temp\pip-record-4ki8wmrk\install-record.txt --single-version-externally-managed --compile:
>  ??? FIND: Invalid switch
>  ??? FIND: Invalid switch
>  ??? FIND: Invalid switch
>  ??? running install
>  ??? running build
>  ??? running build_py
>  ??? creating build
>  ??? creating build\lib.win-amd64-3.7
>  ??? creating build\lib.win-amd64-3.7\pyexiv2
>  ??? copying src\pyexiv2\exif.py -> build\lib.win-amd64-3.7\pyexiv2
>  ??? copying src\pyexiv2\iptc.py -> build\lib.win-amd64-3.7\pyexiv2
>  ??? copying src\pyexiv2\metadata.py -> build\lib.win-amd64-3.7\pyexiv2
>  ??? copying src\pyexiv2\preview.py -> build\lib.win-amd64-3.7\pyexiv2
>  ??? copying src\pyexiv2\utils.py -> build\lib.win-amd64-3.7\pyexiv2
>  ??? copying src\pyexiv2\xmp.py -> build\lib.win-amd64-3.7\pyexiv2
>  ??? copying src\pyexiv2\__init__.py -> build\lib.win-amd64-3.7\pyexiv2
>  ??? running build_ext
>  ??? building 'libexiv2python' extension
>  ??? creating build\temp.win-amd64-3.7
>  ??? creating build\temp.win-amd64-3.7\Release
>  ??? creating build\temp.win-amd64-3.7\Release\src
>  ??? C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Id:\apps\python37\include -Id:\apps\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /EHsc /Tpsrc/exiv2wrapper.cpp /Fobuild\temp.win-amd64-3.7\Release\src/exiv2wrapper.obj -g
>  ??? cl : Command line warning D9002 : ignoring unknown option '-g'
>  ??? exiv2wrapper.cpp
>  ??? c:\users\ken\appdata\local\temp\pip-install-swqqye4_\py3exiv2\src\exiv2wrapper.hpp(32): fatal error C1083: Cannot open include file: 'exiv2/image.hpp': No such file or directory

This is the reason for the failure.  Either the build instruction is 
incorrect, or the file is missing.  The py3exiv2 author is listed on the 
web page.  I forwarded you post to him.

>  ??? error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
>  ??? ----------------------------------------
> Command "d:\apps\python37\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Ken\\AppData\\Local\\Temp\\pip-install-swqqye4_\\py3exiv2\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Ken\AppData\Local\Temp\pip-record-4ki8wmrk\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Ken\AppData\Local\Temp\pip-install-swqqye4_\py3exiv2\
> You are using pip version 19.0.3, however version 19.1 is available.
> You should consider upgrading via the 'python -m pip install --upgrade pip' command.

Many package authors write and test on *nix, especially when the package 
includes C or C++ code that needs to be compiled.  Compiling on Windows 
with VSC++ instead of gcc required additional expertise.

Unofficial Windows Binaries for Python Extension Packages
has a build for pyexiv2, for 2.7.  I suggested to Christoph that he add 
py3exiv2 for 3.x.  While I normally highly recommend starting with 3.x, 
you could try the prebuilt 2.7 version until you can either build or 
download py3exiv.

Terry Jan Reedy