Can macOS Apple Silicon binary wheels be provided? #1263
Replies: 13 comments 20 replies
-
Use only wheels for the installation by running |
Beta Was this translation helpful? Give feedback.
-
We are up to beta 3 now... |
Beta Was this translation helpful? Give feedback.
-
@Carreau can you try building this release? |
Beta Was this translation helpful? Give feedback.
-
And feel free to ping me on issues, or patches where you need someone to run some code to try. |
Beta Was this translation helpful? Give feedback.
-
I was able to successfully install, but it failed upon import. 16-inch, 2021 MacBook Pro, M1 Pro, Ventura 13.5
|
Beta Was this translation helpful? Give feedback.
-
On a MacBook Pro with Apple M2 Pro chip, I ran the following commands: mamba create -n pyodbc python=3.11 unixodbc pip
conda activate pyodbc
python -m pip install --only-binary=:all: pyodbc==5.0.0b3
python Within the python REPL, I ran: import pyodbc I got an error. Here's the full REPL log:
|
Beta Was this translation helpful? Give feedback.
-
Reading through issue #1124 I'm wondering if setting the export LDFLAGS="-L$CONDA_PREFIX/lib"
export CPPFLAGS="-I$CONDA_PREFIX/include" all the steps# Create a conda environment and activate it.
conda create --name pyodbc python=3.11 pip unixodbc
conda activate pyodbc
# Set the flags.
export LDFLAGS="-L$CONDA_PREFIX/lib"
export CPPFLAGS="-I$CONDA_PREFIX/include"
# Install pyodbc.
python -m pip install --only-binary=:all: pyodbc==5.0.0b3
# Try to import pyodbc and print the version.
python -c "import pyodbc; print(pyodbc.version)" |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
I build the macos arm wheel beta3 for 3.8, 3.9, 3.10, 3.11:
If you wish to try the wheel you can find them here: https://github.com/Carreau/test-whl My guess is they will work on conda, but I'm curious if they will work on brew-python. If that works, maybe someone that know more about how to compare .so objects can figure out the problem ? |
Beta Was this translation helpful? Give feedback.
-
Run |
Beta Was this translation helpful? Give feedback.
-
Yes, if you remove One potential solution here is to use a macOS runner to build the macOS distributable: |
Beta Was this translation helpful? Give feedback.
-
It was brought to my attention that github now have M1 runners in beta: https://github.blog/2023-10-02-introducing-the-new-apple-silicon-powered-m1-macos-larger-runner-for-github-actions/ Maybe it can be used to build a working wheel. |
Beta Was this translation helpful? Give feedback.
-
Thanks @Carreau. It has now been officially released and @keitherskine has updated the workflow to use the new runner. Version 5.1.0 has just been released with binaries for both Intel & ARM. We'd appreciate feedback from anyone using pyodbc on Macs. |
Beta Was this translation helpful? Give feedback.
-
We're retrying macOS Apple Silicon wheels, for those with M1, M2, etc. chips. If you have one of these, please give this release a try so we know before the final 5.0.0 release in a few days.
This means you would not use Rosetta. Just install normally using
python -m pip install --only-binary=:all: pyodbc==5.0.0b3
.For those wondering, the inability to supply these wheels has not been due to any pyodbc code issues. We use Github Actions to build all the different versions and it still doesn't have complete support for macOS Apple Silicon CI runners. At this time, only Intel is supported. However, we can cross-compile and generate ARM wheels on Intel, but we can't test them. That's why we need your help!
Beta Was this translation helpful? Give feedback.
All reactions