Closed FBen3 closed 2 years ago
Might be related: Problem when building from source on ARM M1 Mac
Hi @FBen3 python 3.10 is not officially supported. Please try 3.8.
Related to this and to #2602. Python 3.9 libraries overall are much more compatible with the new Mac processor. Moreover, although python=3.7
seems to be the official version recommended in the installation page and the cheatsheet, maybe that could be moved to python=3.8
as there is no python 3.7 build for the os-arm64 processor?
@vigji we are updating supported python versions to 3.7 - 3.9 in the next release (2.14.0, coming soon). We have updated the install instructions to remove mention of 3.7. I am not sure who owns that cheatsheet but I'll try to figure that out.
Awesome!
Hi @FBen3, just wondering were you able to install allenSDK afterwards on Mac M1? I tried install python3.8 and still can't install allenSDK.
`clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly clang: clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/jessysong/miniforge3/envs/env_mntest8/include -arch arm64 -fPIC -O2 -isystem /Users/jessysong/miniforge3/envs/env_mntest8/include -arch arm64 -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_ATLAS_INFO=3 -DHAVE_CBLAS -Ibuild/src.macosx-11.0-arm64-3.8/numpy/core/src/umath -Ibuild/src.macosx-11.0-arm64-3.8/numpy/core/src/npymath -Ibuild/src.macosx-11.0-arm64-3.8/numpy/core/src/common -Inumpy/core/include -Ibuild/src.macosx-11.0-arm64-3.8/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/Users/jessysong/miniforge3/envs/env_mntest8/include/python3.8 -Ibuild/src.macosx-11.0-arm64-3.8/numpy/core/src/common -Ibuild/src.macosx-11.0-arm64-3.8/numpy/core/src/npymath -Ibuild/src.macosx-11.0-arm64-3.8/numpy/core/src/common -Ibuild/src.macosx-11.0-arm64-3.8/numpy/core/src/npymath -c numpy/core/src/multiarray/alloc.c -o build/temp.macosx-11.0-arm64-cpython-38/numpy/core/src/multiarray/alloc.o -MMD -MF build/temp.macosx-11.0-arm64-cpython-38/numpy/core/src/multiarray/alloc.o.d -faltivec -I/System/Library/Frameworks/vecLib.framework/Headers" failed with exit status 1 [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> numpy
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output. `
Some of the pinned dependencies don't play nice with Mac M1. I had to install some packages from conda-forge in order to install allensdk on my Mac M1. I used mambaforge (a faster version of conda that has conda-forge as a default channel). Here are my steps to install allensdk in a clean conda environment:
mamba create --name testenv python=3.8 --yes
mamba activate testenv
mamba install pytables "statsmodels<=0.13.0" "matplotlib==3.4.2" --yes
pip install -U allensdk
# test the installation
python -c "import allensdk"
This also works for python 3.9.
I see, thank you for the info!
For anyone facing similar issues using conda environment on Mac M1, I ended up just setup an x86_64 conda environment (based on Rosetta):
conda activate env_x86
pip install numpy
pip install allensdk
Though not ideal (since it's not leveraging M1) it does work.
Some of the pinned dependencies don't play nice with Mac M1. I had to install some packages from conda-forge in order to install allensdk on my Mac M1. I used mambaforge (a faster version of conda that has conda-forge as a default channel). Here are my steps to install allensdk in a clean conda environment:
mamba create --name testenv python=3.8 --yes mamba activate testenv mamba install pytables "statsmodels<=0.13.0" "matplotlib==3.4.2" --yes pip install -U allensdk # test the installation python -c "import allensdk"
This also works for python 3.9.
fyi, I ran into the same issue today on a M1 Mac, and came upon a different solution without Rosetta.
to reproduce:
conda create -n allensdk python=3.8
conda activate allensdk
pip install allensdk
Installation fails when building tables
:
Collecting tables (from allensdk)
Using cached tables-3.8.0.tar.gz (8.0 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
...
An alternate solution was provided here: https://github.com/DeepLabCut/DeepLabCut/issues/2342#issuecomment-1669036527
pip uninstall tables
conda install pytables
Then pip install allensdk
finishes successfully.
Describe the bug
I tried following the Accessing Visual Behavior Ophys Data from the official guide. I created a new virtual environment with the latest version of
pip 22.1.2
andPython3.10
, then didpip install allensdk
. First I run into issues described in Issue #426. Then it fails requiringnumpy
but after those are resolved it fails again giving a long error message.To Reproduce
Expected behavior
clean pip install of allensdk
Actual Behavior
Error message is too long, I'm getting
Here are parts:
Environment (please complete the following information):
macOS 12.4
Python 3.10.3
Additional context
Ran into Issue #426 in the process of install.
Do you want to work on this issue?
No