本文介绍了无法通过pip安装py3exiv2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行pip install py3exiv2时,出现此错误:

Collecting py3exiv2
  Downloading py3exiv2-0.2.1.tar.gz
Installing collected packages: py3exiv2
  Running setup.py install for py3exiv2 ... error
    Complete output from command /home/vagrant/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-j6a3aby9/py3exiv2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ppz_a46j-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/vagrant/venv/include/site/python3.4/py3exiv2:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.4
    creating build/lib.linux-x86_64-3.4/pyexiv2
    copying src/pyexiv2/iptc.py -> build/lib.linux-x86_64-3.4/pyexiv2
    copying src/pyexiv2/exif.py -> build/lib.linux-x86_64-3.4/pyexiv2
    copying src/pyexiv2/xmp.py -> build/lib.linux-x86_64-3.4/pyexiv2
    copying src/pyexiv2/preview.py -> build/lib.linux-x86_64-3.4/pyexiv2
    copying src/pyexiv2/__init__.py -> build/lib.linux-x86_64-3.4/pyexiv2
    copying src/pyexiv2/utils.py -> build/lib.linux-x86_64-3.4/pyexiv2
    copying src/pyexiv2/metadata.py -> build/lib.linux-x86_64-3.4/pyexiv2
    running build_ext
    building 'libexiv2python' extension
    creating build/temp.linux-x86_64-3.4
    creating build/temp.linux-x86_64-3.4/src
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/home/vagrant/venv/include -I/usr/include/python3.4m -c src/exiv2wrapper.cpp -o build/temp.linux-x86_64-3.4/src/exiv2wrapper.o -g
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
    In file included from src/exiv2wrapper.cpp:27:0:
    src/exiv2wrapper.hpp:32:27: fatal error: exiv2/image.hpp: No such file or directory
     #include "exiv2/image.hpp"
                               ^
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

我在Mac上使用Python 3.5进行了尝试,并在Ubuntu上使用virtualenv和Python 3.4进行了尝试,

I tried on a mac with Python 3.5, and on Ubuntu with virtualenv and Python 3.4, similar error.

我忘了手动安装一些依赖项吗?软件包不使用最新的Python版本维护吗?

Did I forget to install some dependency manually?Is the package not maintained with newest Python version?

谢谢.

推荐答案

尝试

sudo apt-get install build-essential
sudo apt-get install python-all-dev
sudo apt-get install libexiv2-dev
sudo apt-get install libboost-python-dev

然后

pip3 install py3exiv2

应该没关系...这些是py3exiv2的构建依赖项...

It should be ok... Those are build dependencies for py3exiv2...

这篇关于无法通过pip安装py3exiv2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-13 13:32