-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to install rawpy on Mac M1? #171
Comments
@clearlon Not sure if you're still having this issue, and to be clear, I have no idea what I'm doing. But I ran into the same exact issue while trying to install something else that listed rawpy as a requirement in a requirements.txt and ultimately managed to get it installed. My machine info: macOS Moneterey - 12.2.1 I'm going to be intentionally super verbose for anyone else scouring google for answers. I got this error first
Which then led to this issue I believe #167. And then that led to these instructions: https://github.com/letmaik/rawpy#installation-from-source-on-linuxmacos, where I ended up getting some behavior similar to you, but also different
It says successful, but in reality rawpy could not be found or used. But there's a peculiar line in there about
So I went ahead and installed
Says successful but it actually failed. Then I happened to find this issue microsoft/vscode-python#15057. I followed the repro steps in there (but I changed the pip command to pip3):
This one ended in the same error again, but the output was slightly different. Now it mentioned Once that finished I went back and re-ran Finally that actually truly installed rawpy, and going back to what I was originally trying to install made it past that step. I'm now stuck on a different part, but hopefully this at least helps with getting rawpy installed on an M1 Mac. |
Keep in mind that there is always the option to use the amd64 version of Python on M1. It may be a little bit slower than the native one but I doubt it's a practical issue in most cases. |
@letmaik Thanks for the heads up. I just tried this via Anaconda and it appears to suffer from the same issue. I added the correct channel, and whether it's via the GUI or CLI, it seems to think rawpy doesn't exist. Edit: I just went with making a docker image. Everything works fine in there. |
I've managed to successfully install from source on Mac M1. Initially, I had the same errors as @JQuezada0 and followed their solutions, up until running
I also ran |
I installed universal2 format python3 from https://www.python.org/downloads/release/python-3108, then use |
any news on being able to install via pip install? |
For anyone waiting, please follow this upstream issue: actions/runner-images#2187 |
I was able to install rawpy following instructions mentioned by @moebaid macOS Moneterey - 12.6.2
It successfully installed rawpy in my site-packages. Later, I deleted rawpy directory. |
I was ultimately able to install rawpy with
Adding my experience to the above solutions for installing on M1 with another issue I ran into with compiling the Cython code due to what seems like a change in the numpy C-API. The Cython compilation issue was in the two places where # ndarr.base = <PyObject*> self
np.PyArray_SetBaseObject(ndarr, self) After making that change, I was able to build/install |
@rafalstapinski Can you open a pull request with the change for numpy? Thanks! |
Hey I built some wheels using my m2 mini local runner you can install with
happy to add my runner to this repo if the owners are interested. This was just a quick patch fix on my end. |
@EmersonDove Thanks for trying this out, it's good to know that it works out of the box just by adding another CI matrix entry with |
True, I think I would have the same reaction if someone offered that to me |
need rawpy on m1 air, new to py - how to? |
Sort of shoehorning my own solution in here in the form of #209 I had a similar problem awhile ago, and decided to build against the system libraw, installed using Homebrew:
Glad to hear the M1 runners will be available soon! |
just tried to follow it on a M1 Mac. Did you experience this? @nullus |
No, looks like it can't find the header path though. If you run Edit: the standard install procedure will correctly build libraw as part of the rawpy installation too! From memory there may be some other build dependencies required: |
@nullus thanks. |
Looked into this a bit. There are already beta runners (paid): https://docs.github.com/en/actions/using-github-hosted-runners/about-larger-runners/running-jobs-on-larger-runners?platform=mac#available-macos-larger-runners The next milestone is General Availability (GA). Expected to be ready: Q1 2024 – Jan-Mar: github/roadmap#819 "Once we reach the GA milestone, we will start working on additional plans to support open source, along with new macOS runners." So might be a while still :) |
Here's a one-liner shot in the dark that happened to work for me in my env (M2, btw): pip install 'git+https://github.com/letmaik/[email protected]#egg=rawpy' You may want to update the tag. |
It fails when I try it @chbrown :
(Environment is Raspberry Pi, 32-bit bookworm) |
Hello, I'm trying to install rawpy on my M3 iMac. I am following the "Installation from source on Linux/macOS" as others have done. The installation itself works fine. However, when trying to use rawpy, I get the following error upon
Any ideas? |
You can use the FlyCI's M1 and M2 runners. Our runners are on average 2x faster and 2x cheaper than GitHub's AND we have a free tier for OSS projects (see below). Install InstructrionsStep 1: Install the FlyCI GitHub app. Example with M1 runners: jobs:
ci:
- runs-on: macos-latest
+ runs-on: flyci-macos-large-latest-m1
steps:
- name: 👀 Checkout repo
uses: actions/checkout@v4 Example with M2 runners: jobs:
ci:
- runs-on: macos-latest
+ runs-on: flyci-macos-large-latest-m2
steps:
- name: 👀 Checkout repo
uses: actions/checkout@v4 500 mins/month Free for Public ReposIf your repo is public, then FlyCI offers 500 mins/month of free M1 runner usage with the Best Regards, |
When I installed on MacOS with M1(arm) according to
Installation from source on Linux/macOS
, it showed thatSuccessfully installed rawpy
, but rawpy was not available.The text was updated successfully, but these errors were encountered: