Файл, не найденный при установке от зернышка

Я пытался решить проблему, которую я нашел при попытке установить пакет Python в Lubuntu 17.04.

Пакет - для python 3.5 64 бита. Это назвало RawPy и зависит от библиотеки LibRaw. Я установил библиотеку LibRaw, но при попытке установить RawPy, она не может найти некоторые файлы установки LibRaw:

lubuntu@lubuntu:~$ sudo -H pip3 install rawpy
Collecting rawpy
  Using cached rawpy-0.9.0.tar.gz
Requirement already satisfied: numpy in /usr/local/lib/python3.5/dist-packages (from rawpy)
Building wheels for collected packages: rawpy
  Running setup.py bdist_wheel for rawpy ... error
  Complete output from command /usr/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-pyqrhjz2/rawpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp9a3kr8dtpip-wheel- --python-tag cp35:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.5
  creating build/lib.linux-x86_64-3.5/rawpy
  copying rawpy/__init__.py -> build/lib.linux-x86_64-3.5/rawpy
  copying rawpy/_version.py -> build/lib.linux-x86_64-3.5/rawpy
  copying rawpy/enhance.py -> build/lib.linux-x86_64-3.5/rawpy
  running build_ext
  building 'rawpy._rawpy' extension
  creating build/temp.linux-x86_64-3.5
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-7CCmgg/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_HAS_LIBRAW_CONFIG_H=0 -I/usr/local/lib/python3.5/dist-packages/numpy/core/include -I/usr/include/python3.5m -c _rawpy.cpp -o build/temp.linux-x86_64-3.5/_rawpy.o
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  In file included from /usr/local/lib/python3.5/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1788:0,
                   from /usr/local/lib/python3.5/dist-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                   from /usr/local/lib/python3.5/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
                   from _rawpy.cpp:482:
  /usr/local/lib/python3.5/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   #warning "Using deprecated NumPy API, disable it by " \
    ^~~~~~~
  In file included from _rawpy.cpp:484:0:
  def_helper.h:1:28: fatal error: libraw_version.h: No such file or directory
   #include "libraw_version.h"
                              ^
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for rawpy
  Running setup.py clean for rawpy
Failed to build rawpy
Installing collected packages: rawpy
  Running setup.py install for rawpy ... error
    Complete output from command /usr/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-pyqrhjz2/rawpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-byii91yd-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.5
    creating build/lib.linux-x86_64-3.5/rawpy
    copying rawpy/__init__.py -> build/lib.linux-x86_64-3.5/rawpy
    copying rawpy/_version.py -> build/lib.linux-x86_64-3.5/rawpy
    copying rawpy/enhance.py -> build/lib.linux-x86_64-3.5/rawpy
    running build_ext
    building 'rawpy._rawpy' extension
    creating build/temp.linux-x86_64-3.5
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-7CCmgg/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -D_HAS_LIBRAW_CONFIG_H=0 -I/usr/local/lib/python3.5/dist-packages/numpy/core/include -I/usr/include/python3.5m -c _rawpy.cpp -o build/temp.linux-x86_64-3.5/_rawpy.o
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    In file included from /usr/local/lib/python3.5/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1788:0,
                     from /usr/local/lib/python3.5/dist-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                     from /usr/local/lib/python3.5/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
                     from _rawpy.cpp:482:
    /usr/local/lib/python3.5/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     #warning "Using deprecated NumPy API, disable it by " \
      ^~~~~~~
    In file included from _rawpy.cpp:484:0:
    def_helper.h:1:28: fatal error: libraw_version.h: No such file or directory
     #include "libraw_version.h"
                                ^
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-pyqrhjz2/rawpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-byii91yd-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-pyqrhjz2/rawpy/
lubuntu@lubuntu:~$

Я проверил и что недостающие файлы существуют в usr/local/lib/libraw. Попробованный, чтобы добавить, что маршрут с помощью ldconfig, но это не работало.

LibRaw делают, кажется, установлен. Когда я пишу ldconfig -p, Я добираюсь:

libraw1394.so.11 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libraw1394.so.11
libraw_r.so.16 (libc6,x86-64) => /usr/local/lib/libraw_r.so.16
libraw_r.so.16 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libraw_r.so.16
libraw_r.so (libc6,x86-64) => /usr/local/lib/libraw_r.so
libraw.so.16 (libc6,x86-64) => /usr/local/lib/libraw.so.16
libraw.so.16 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libraw.so.16
libraw.so (libc6,x86-64) => /usr/local/lib/libraw.so

И действительно:

lubuntu@lubuntu:~$ sudo apt install libraw-dev 
Reading package lists... 
Done Building dependency tree        
Reading state information... 
Done libraw-dev is already the newest version (0.18.1-1). 
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 
lubuntu@lubuntu:~$

Местоположения файла - они:

lubuntu@lubuntu:~$ sudo find / -name libraw_version.h
/usr/include/libraw/libraw_version.h
/usr/local/include/libraw/libraw_version.h
/home/lubuntu/libraw/libraw/libraw_version.h
find: ‘/run/user/999/gvfs’: Permission denied
lubuntu@lubuntu:~$

Третье местоположение является папкой загрузки исходного кода от GitHub. Я также скомпилировал последнюю версию кода, но это не работало

Там какой-либо путь состоит в том, чтобы явно сказать зернышку выглядеть в определенном пути для зависимостей? Я даже думал, о, изменяя источник для явного сообщения пути, но я не думаю, что это - надлежащая фиксация.

Кто-то какая-либо идея?

0
задан 24 April 2017 в 12:13

2 ответа

Правовая оговорка: я - разработчик rawpy.

я не уверен в конкретном вопросе, который Вы имеете, но я недавно выпустил новую версию, которая обеспечивает двоичные пакеты (колеса) для Linux (в дополнение к Windows и macOS), так больше никакой компиляции или ручной установки необходимого libraw. Просто переустановите rawpy, и он должен работать из поля.

1
ответ дан 3 November 2019 в 09:21

Попробуйте echo "/usr/local/lib" | sudo tee /etc/ld.so.conf.d/99local.conf

сопровождаемый sudo ldconfig.

Это - tken от эти инструкции по установке для rawpy.

0
ответ дан 3 November 2019 в 09:21

Другие вопросы по тегам:

Похожие вопросы: