numba / numba-benchmark

BSD 2-Clause "Simplified" License
9 stars 6 forks source link

meet unsupported wheel error on this platform after asv run #14

Closed dlee992 closed 1 year ago

dlee992 commented 2 years ago

Hi, guys, I have a problem when using this repo on my mac (x86_64)

First, I create a conda env as readme said:

> conda create -n numba-benchmark python=3.8 conda-forge::asv
> conda list
# packages in environment at /Users/ld/opt/anaconda3/envs/numba-benchmark:
#
# Name                    Version                   Build  Channel
asv                       0.5.1            py38ha048514_0    conda-forge
ca-certificates           2022.4.26            hecd8cb5_0
certifi                   2022.6.15        py38hecd8cb5_0
libcxx                    12.0.0               h2f01273_0
libffi                    3.3                  hb1e8313_2
ncurses                   6.3                  hca72f7f_2
openssl                   1.1.1o               hca72f7f_0
pip                       21.2.4           py38hecd8cb5_0
python                    3.8.13               hdfd78df_0
python_abi                3.8                      2_cp38    conda-forge
readline                  8.1.2                hca72f7f_1
setuptools                61.2.0           py38hecd8cb5_0
six                       1.16.0             pyhd3eb1b0_1
sqlite                    3.38.5               h707629a_0
tk                        8.6.12               h5d9f67b_0
wheel                     0.37.1             pyhd3eb1b0_0
xz                        5.2.5                hca72f7f_1
zlib                      1.2.12               h4dc903c_2

Then I modified the asv.conf.json with specifying "branches": ["release0.55"], and "pythons": ["3.8"],. Finally, I ran:

> asv run
· Fetching recent changes.
· Creating environments......
· Discovering benchmarks
·· Uninstalling from conda-py3.8.13-clang-cudatoolkit-llvmlite-numpy.
·· Building 2298ad61 <0.55.2^0> for conda-py3.8.13-clang-cudatoolkit-llvmlite-numpy..........
·· Installing 2298ad61 <0.55.2^0> into conda-py3.8.13-clang-cudatoolkit-llvmlite-numpy.
·· Error running /Users/ld/Code/numba-benchmark/env/883704cea3e8caa6b210773fb93ac9f3/bin/python -mpip install /Users/ld/Code/numba-benchmark/env/883704cea3e8caa6b210773fb93ac9f3/asv-build-cache/2298ad6186d177f39c564046890263b0f1c74ecc/numba-0.55.2-cp38-cp38-macosx_12_0_x86_64.whl (exit status 1)
   STDOUT -------->

   STDERR -------->
   ERROR: numba-0.55.2-cp38-cp38-macosx_12_0_x86_64.whl is not a supported wheel on this platform.

·· Failed to build the project and import the benchmark suite.

My local clang (in /Library/Developer/CommandLineTools/usr/bin) version is 13.1.6, but I think in conda env, my local clang shouldn't be used by these packages in the env. All python 3.8.13 installled by conda env and asv created conda env are both built with clang 12.0.0.

I also found using conda install, I can only install numba=0.55.1, rather than numba=0.55.2. And if I use pip install, the installed numba package is numba-0.55.2-cp38-cp38-macosx_10_14_x86_64.whl, which is macosx_10_14, rather than macosx_12_0

I tried a few hours in this problem, but I didn't solve it right now. Any idea?

dlee992 commented 2 years ago

I found a related issues in https://github.com/apple/tensorflow_macos/issues/46, since pip couldn't figure out the correct macosx version.

seibert commented 2 years ago

I think you are running into the macOS system version compatibility issue. If your version of Python was built with the pre-macOS 11 SDK (as basically all Python 3.8 builds were), then macOS will pretend to be macOS 10.16, and thus pip will refuse to install macOS 12 wheels. You can workaround this issue by setting an environment variable while running pip:

SYSTEM_VERSION_COMPAT=0 python -m pip install ...

(This is also what Apple tells people to do on their TensorFlow plugin page: https://developer.apple.com/metal/tensorflow-plugin/)

dlee992 commented 2 years ago

I guess you're right, I will try it again.

esc commented 2 years ago

I should also note, that this repo is somewhat unmaintained so the advice "here be dragons" may apply here too 🐉

dlee992 commented 1 year ago

I didn't follow this up after previous discussion, I think I should just close this.