在MACOS问题上安装PY3EXIV2



我想校准相机镜头,为此,我在此处按照说明进行操作。根据乐器的说法,我需要此处的python3-exiv2依赖。

当我尝试运行此操作时:

pip3 install py3exiv2

我明白了:

Collecting py3exiv2
  Using cached https://files.pythonhosted.org/packages/39/0d/e3a63593c620c4a2999809aa011aa6f190553b20fd6904f7a11946dde722/py3exiv2-0.6.1.tar.gz
Building wheels for collected packages: py3exiv2
  Building wheel for py3exiv2 (setup.py) ... error
  Complete output from command /usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/mn/_vm4d7cx4gx2_l5hkjybzkfc0000gn/T/pip-install-zeuz9z_9/py3exiv2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/mn/_vm4d7cx4gx2_l5hkjybzkfc0000gn/T/pip-wheel-1l2_8rw6 --python-tag cp37:
  find: /usr//sbin/authserver: Permission denied
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.14-x86_64-3.7
  creating build/lib.macosx-10.14-x86_64-3.7/pyexiv2
  copying src/pyexiv2/preview.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
  copying src/pyexiv2/iptc.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
  copying src/pyexiv2/metadata.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
  copying src/pyexiv2/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
  copying src/pyexiv2/xmp.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
  copying src/pyexiv2/exif.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
  copying src/pyexiv2/utils.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
  running build_ext
  building 'libexiv2python' extension
  creating build/temp.macosx-10.14-x86_64-3.7
  creating build/temp.macosx-10.14-x86_64-3.7/src
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/exiv2wrapper.cpp -o build/temp.macosx-10.14-x86_64-3.7/src/exiv2wrapper.o -g
  In file included from src/exiv2wrapper.cpp:27:
  src/exiv2wrapper.hpp:35:10: fatal error: 'boost/python.hpp' file not found
  #include "boost/python.hpp"
           ^~~~~~~~~~~~~~~~~~
  1 error generated.
  error: command 'clang' failed with exit status 1
  ----------------------------------------
  Failed building wheel for py3exiv2
  Running setup.py clean for py3exiv2
Failed to build py3exiv2
Installing collected packages: py3exiv2
  Running setup.py install for py3exiv2 ... error
    Complete output from command /usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/mn/_vm4d7cx4gx2_l5hkjybzkfc0000gn/T/pip-install-zeuz9z_9/py3exiv2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/mn/_vm4d7cx4gx2_l5hkjybzkfc0000gn/T/pip-record-mo9lifhv/install-record.txt --single-version-externally-managed --compile:
    find: /usr//sbin/authserver: Permission denied
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.14-x86_64-3.7
    creating build/lib.macosx-10.14-x86_64-3.7/pyexiv2
    copying src/pyexiv2/preview.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
    copying src/pyexiv2/iptc.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
    copying src/pyexiv2/metadata.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
    copying src/pyexiv2/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
    copying src/pyexiv2/xmp.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
    copying src/pyexiv2/exif.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
    copying src/pyexiv2/utils.py -> build/lib.macosx-10.14-x86_64-3.7/pyexiv2
    running build_ext
    building 'libexiv2python' extension
    creating build/temp.macosx-10.14-x86_64-3.7
    creating build/temp.macosx-10.14-x86_64-3.7/src
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/exiv2wrapper.cpp -o build/temp.macosx-10.14-x86_64-3.7/src/exiv2wrapper.o -g
    In file included from src/exiv2wrapper.cpp:27:
    src/exiv2wrapper.hpp:35:10: fatal error: 'boost/python.hpp' file not found
    #include "boost/python.hpp"
             ^~~~~~~~~~~~~~~~~~
    1 error generated.
    error: command 'clang' failed with exit status 1
    ----------------------------------------
Command "/usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/mn/_vm4d7cx4gx2_l5hkjybzkfc0000gn/T/pip-install-zeuz9z_9/py3exiv2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/mn/_vm4d7cx4gx2_l5hkjybzkfc0000gn/T/pip-record-mo9lifhv/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/mn/_vm4d7cx4gx2_l5hkjybzkfc0000gn/T/pip-install-zeuz9z_9/py3exiv2/

我不知道从哪里开始。谁能提出我目前可以尝试的?

运行以下内容没有帮助:

brew boost-python

您面临的问题是因为在MacOS新版本上,PIP3并未在正确的位置寻找标头文件。在此处查看我的答案:https://answers.launchpad.net/py3exiv2/question/700064

这就是我的修复:

要解决这个问题,请执行以下操作:

brew install boost-python3 gexiv2 pygobject3

安装依赖项后,您将面临更多错误。要解决这些问题,请设置Corrext Incluber和Linker路径,然后使用PIP安装模块。

export CPLUS_INCLUDE_PATH=/usr/local/Cellar/exiv2/0.27.5_1/include/:/usr/local/opt/libssh/include/:/usr/local/Cellar/boost/1.76.0/include/
export LDFLAGS="-L/usr/local/Cellar/boost-python3/1.76.0/lib -L/usr/local/Cellar/exiv2/0.27.5_1/lib"
 pip install py3exiv2

或使用Pipenv


 CPLUS_INCLUDE_PATH=/usr/local/Cellar/exiv2/0.27.5_1/include/:/usr/local/opt/libssh/include/:/usr/local/Cellar/boost/1.76.0/include/ LDFLAGS="-L/usr/local/Cellar/boost-python3/1.76.0/lib -L/usr/local/Cellar/exiv2/0.27.5_1/lib" pipenv install

相关内容

  • 没有找到相关文章

最新更新