Romain F
Romain F

Reputation: 407

Issue for Python RAWPY package installation on Windows

I want to read RAW files on Python, and it seems that the Rawpy package is well suited for this. However when trying to install it using the Windows CMD

C:\Users\myself>py -m pip install rawpy

Or directly using Spyder command line with

!pip install rawpy

I get the following error

Using cached https://files.pythonhosted.org/packages/67/05/866890cb4d0d76f12bf83cc55a935694c9febb4728cca861d3f7711f46f4/rawpy-0.12.0.tar.gz
Requirement already satisfied: numpy in c:\users\myself\appdata\local\continuum\anaconda3\lib\site-packages (from rawpy) (1.15.1)
Building wheels for collected packages: rawpy
  Running setup.py bdist_wheel for rawpy ... error
  Complete output from command C:\Users\myself\AppData\Local\Continuum\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\myself\\AppData\\Local\\Temp\\pip-install-40sfkvpi\\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 C:\Users\myself\AppData\Local\Temp\pip-wheel-3bs1uw1y --python-tag cp37:
  LibRaw git submodule is not cloned yet, will invoke "git submodule update --init" now
  copying CMake scripts from LibRaw-cmake repository
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Users\myself\AppData\Local\Temp\pip-install-40sfkvpi\rawpy\setup.py", line 298, in <module>
      windows_libraw_compile()
    File "C:\Users\myself\AppData\Local\Temp\pip-install-40sfkvpi\rawpy\setup.py", line 151, in windows_libraw_compile
      clone_submodules()
    File "C:\Users\myself\AppData\Local\Temp\pip-install-40sfkvpi\rawpy\setup.py", line 132, in clone_submodules
      shutil.copy('external/LibRaw-cmake/CMakeLists.txt', 'external/LibRaw/CMakeLists.txt')
    File "C:\Users\myself\AppData\Local\Continuum\anaconda3\lib\shutil.py", line 241, in copy
      copyfile(src, dst, follow_symlinks=follow_symlinks)
    File "C:\Users\myself\AppData\Local\Continuum\anaconda3\lib\shutil.py", line 120, in copyfile
      with open(src, 'rb') as fsrc:
  FileNotFoundError: [Errno 2] No such file or directory: 'external/LibRaw-cmake/CMakeLists.txt'

The last error line explicitly says that the file external/LibRaw-cmake/CMakeLists.txt cannot be found. Do you have any idea how to solve the issue?

For information, other packages don't show errors when running these CMD command lines. The error is really rawpy package dependent.

Upvotes: 0

Views: 3222

Answers (1)

letmaik
letmaik

Reputation: 3500

The version available at the time of the post (0.12.0) didn't offer Python 3.7 wheels, therefore pip downloaded the source distribution and tried to compile the package manually. This failed since it requires a more involved development setup.

A new rawpy version 0.13.0 is released now and offers wheels for Python 3.7 as well. A simple pip install rawpy should then work and download the wheel instead of the source distribution.

Upvotes: 1

Related Questions