Python-Image-Converter
Python-Image-Converter copied to clipboard
No module named 'rawpy'
I'm getting ModuleNotFoundError for 'rawpy' library on my MacOS. I tried installing rawpy directly using 'pip install' / 'brew install' and also using .whl files of multiple versions downloading from org website. Didn't seem to be working anyways. Please help me with this? Thanks.
Traceback (most recent call last): File "photo_raw_converter_svc/converter.py", line 5, in <module> import rawpy ModuleNotFoundError: No module named 'rawpy'
This is my installed libraries in my venv
Cython==0.29.24 imageio==2.9.0 numpy==1.21.2 Pillow==8.3.2
@ManudattaG Thanks for letting me know !
I will have a look !!!
@ManudattaG What MacOS version are you using ?
@achimoraites Yeah. I tried running pip install Pillow rawpy imageio inside my environment and this is the stacktrace
Collecting rawpy ERROR: Could not find a version that satisfies the requirement rawpy (from versions: none) ERROR: No matching distribution found for rawpy
Tried installing different rawpy versions as well (from org and .whl files). Some or the other dependencies fail.
MacOS version -- Big Sur 11.6
Have you tried using Anaconda ?
You could also try to update pip
pip install --upgrade pip
And then try to run
pip install Pillow rawpy imageio
@achimoraites Unfortunately conda also didn't work. I managed to install 'rawpy' by following this link. It seemed to work and installed latest version of libraw and rawpy like mentioned in "Installation from source on Linux/macOS" from the docs.
But while running the app --> cd app --> python convert.py --s ./images I'm getting the below error
Traceback (most recent call last):
File "convert.py", line 5, in <module>
import rawpy
File "/Users/PythonExamples/Python-Image-Converter/env/lib/python3.8/site-packages/rawpy/__init__.py", line 5, in <module>
import rawpy._rawpy
ImportError: dlopen(/Users/PythonExamples/Python-Image-Converter/env/lib/python3.8/site-packages/rawpy/_rawpy.cpython-38-darwin.so, 2): Symbol not found: __ZN6LibRaw11open_bufferEPvm
Referenced from: /Users/PythonExamples/Python-Image-Converter/env/lib/python3.8/site-packages/rawpy/_rawpy.cpython-38-darwin.so
Expected in: flat namespace
in /Users/PythonExamples/Python-Image-Converter/env/lib/python3.8/site-packages/rawpy/_rawpy.cpython-38-darwin.so
im getting this same issue on a m1 Mac on Monterey 12.3.1 and would love help with a resolution
Same issue here on M1 Pro macOS Monteray 12.1
-
pip install rawpy - ERROR: Could not find a version that satisfies the requirement rawpy (from versions: none) ERROR: No matching distribution found for rawpy
-
conda install rawpy - (with miniforge) Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- rawpy
Current channels:
- https://conda.anaconda.org/conda-forge/osx-arm64
- https://conda.anaconda.org/conda-forge/noarch
I will have a look !
meanwhile does this work for you ? https://anaconda.org/appfanu/rawpy
Hello thanks, I get the same error as "conda install rawpy" with both suggestions on the given link
@ManudattaG @adrienohana @pmm36 I just tried it in MacOS Monterey using Python v3.8.13 It worked without issues š¤
Note that unfortunately i don't have an M1 machine to test it š
Here are the exact versions that were used
imageio==2.16.2
Pillow==9.1.0
rawpy==0.17.1
numpy==1.22.3
I have included the requirements.txt file in the project as well
Here there is some extra info about my anaconda setup
conda version : 4.12.0
conda-build version : 3.21.4
python version : 3.8.8.final.0
virtual packages : __osx=10.16=0
__unix=0=0
__archspec=1=x86_64
conda av metadata url : None
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
platform : osx-64
user-agent : conda/4.12.0 requests/2.25.1 CPython/3.8.8 Darwin/21.4.0 OSX/10.16
OS specific
System Version: macOS 12.3 (21E230)
Kernel Version: Darwin 21.4.0
I have published it as a package š¦ in PyPI, you could try to see if installing it from there works for you
pip3 install raw_image_converter
Dear @achimoraites,
Thank you for your help. I've just set up an environment with your requirements and the same python version . tried all of the above again (and pip3 install raw_image_converter) but it's still not working on my M1...
ERROR: Could not find a version that satisfies the requirement rawpy (from versions: none) ERROR: No matching distribution found for rawpy
It works in x86 macos. And on m1 in x86 mode through rosetta I did get it installed on a m1 mac mini over a year ago on an earlier version of python and it works. However I have been unable to reproduce on another machine without copying the entire python environment from that machine. And even then updating python causes it to stop working. It'd not a deal-breaker at the moment because of rosetta, but I would really like to build native m1 apps with it
On Fri, 15 Apr 2022, 05:58 Achilles Moraites, @.***> wrote:
@ManudattaG https://github.com/ManudattaG @adrienohana https://github.com/adrienohana @pmm36 https://github.com/pmm36 I just tried it in MacOS Monterey using Python v3.8.13 It worked without issues š¤
Note that unfortunately i don't have an M1 machine to test it š
Here are the exact versions that were used
certifi==2021.10.8
imageio==2.16.2
numpy==1.22.3
Pillow==9.1.0
rawpy==0.17.1
I have included the requirements.txt file in the project as well
Here there is some extra info about my anaconda setup
conda version : 4.12.0
conda-build version : 3.21.4
python version : 3.8.8.final.0
virtual packages : __osx=10.16=0
__unix=0=0 __archspec=1=x86_64conda av metadata url : None
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/osx-64 https://repo.anaconda.com/pkgs/r/noarchplatform : osx-64
user-agent : conda/4.12.0 requests/2.25.1 CPython/3.8.8 Darwin/21.4.0 OSX/10.16
OS specific
System Version: macOS 12.3 (21E230)
Kernel Version: Darwin 21.4.0
ā Reply to this email directly, view it on GitHub https://github.com/achimoraites/Python-Image-Converter/issues/4#issuecomment-1099978295, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYAJFDLJA7TLAX6CUHGTO7TVFEVUXANCNFSM5ECGR7JQ . You are receiving this because you were mentioned.Message ID: @.***>
Ran in to this yesterday. Thought it might be that Iām testing the latest beta on my M1. Apparently not. Whom do I need to pay? ;)
Compile from source is the easiest way to get it running natively for Apple silicon iirc correctly I had to manually download and install cmake for the instructions on the rawpy page to work
On Sun, Nov 20, 2022, 10:21 AM SmartDucksWorks @.***> wrote:
Ran in to this yesterday. Thought it might be that Iām testing the latest beta on my M1. Apparently not. Whom do I need to pay? ;)
ā Reply to this email directly, view it on GitHub https://github.com/achimoraites/Python-Image-Converter/issues/4#issuecomment-1321131549, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYAJFDMWFKABKOFCQSLSPGLWJIQUVANCNFSM5ECGR7JQ . You are receiving this because you were mentioned.Message ID: @.***>
Seems like this issue still exists on Apple Silicon. Tried installing from source too, as mentioned in the documentation, but repeatedly got ModuleNotFoundError. Should $PYTHONPATH be updated after the install?
Installation steps:
gh repo clone letmaik/rawpy
cd rawpy
pip3 intall .
Output:
Installing collected packages: rawpy
DEPRECATION: rawpy is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for rawpy ... done
Successfully installed rawpy
However, scripts are unable to locate the package.
ModuleNotFoundError: No module named 'rawpy'
also the same error in M2 Macbook Air. Try all the methods above but still: pip install rawpy ERROR: Could not find a version that satisfies the requirement rawpy (from versions: none) ERROR: No matching distribution found for rawpy
also the same error in M2 Macbook Air. Try all the methods above but still: pip install rawpy ERROR: Could not find a version that satisfies the requirement rawpy (from versions: none) ERROR: No matching distribution found for rawpy
m2 is the same architecture as m1 they are all Apple silicon arm64 Follow the instructions on the rawpy page, after manually downloading and installing cmake + enable command line tools in the cmake gui menu
ensure that typing cmake in the terminal works.
then install Libraw from source git clone https://github.com/LibRaw/LibRaw.git libraw git clone https://github.com/LibRaw/LibRaw-cmake.git libraw-cmake cd libraw git checkout 0.20.0 cp -R ../libraw-cmake/* . cmake . sudo make install
then install rawpy from source
git clone https://github.com/letmaik/rawpy cd rawpy pip install numpy cython pip install .
@pmm36 amazing bro, it works. Thanks a lot
Great! Glad to hear it :)
On Fri, 19 Jan 2024 at 00:03 GrousexyHKCN @.***> wrote:
@pmm36 https://github.com/pmm36 amazing bro, it works. Thanks a lot
ā Reply to this email directly, view it on GitHub https://github.com/achimoraites/Python-Image-Converter/issues/4#issuecomment-1899572500, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYAJFDKW5XH3WFMO23J6MFDYPHPAVAVCNFSM5ECGR7J2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBZHE2TOMRVGAYA . You are receiving this because you were mentioned.Message ID: @.***>
This worked for me a few months ago. Something happened and I had to start from scratch with getting everything I was sing with rawpy reinstalled etc... Now when I try this "Failed to build rawpy ERROR: Could not build wheels for rawpy, which is required to install pyproject.toml-based projects" Does anyone know what this might be? I have an M1 Pro Mac
This worked for me a few months ago. Something happened and I had to start from scratch with getting everything I was sing with rawpy reinstalled etc... Now when I try this "Failed to build rawpy ERROR: Could not build wheels for rawpy, which is required to install pyproject.toml-based projects" Does anyone know what this might be? I have an M1 Pro Mac
I had similar after reinstalling my machine, I ended up deleting all rawpy and Libraw folders created during the previous build and running through the compiling from source process from the beginning (ensuring cmake was installed and callable from the terminal first
This worked for me a few months ago. Something happened and I had to start from scratch with getting everything I was sing with rawpy reinstalled etc... Now when I try this "Failed to build rawpy ERROR: Could not build wheels for rawpy, which is required to install pyproject.toml-based projects" Does anyone know what this might be? I have an M1 Pro Mac
I had similar after reinstalling my machine, I ended up deleting all rawpy and Libraw folders created during the previous build and running through the compiling from source process from the beginning (ensuring cmake was installed and callable from the terminal first
Thank you this worked