-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Trying to install MxNet and GluonCV on Mac M1 #20992
Comments
Welcome to Apache MXNet (incubating)! We are on a mission to democratize AI, and we are glad that you are contributing to it by opening this issue. |
I was able to get mxnet version 1.6 compiling for m1 macs by basically copying some of their stuff from the 2.0 code: top of cmakelists script that loads the config.cmake file, moved the darwin config.cmake to root, and replaced the scripts the blas and accelerate framework package finders. I could fork it if it's wanted. I had to disable USE_SSE for it to function (config.cmake) and I don't have enough time to research what was wrong there. Remove .txt extension to this config.cmake.txt here, place it in the root, and then replace the chooseblas and findaccerlerate with the ones from the 2.0 branch. |
I used some of the same approaches as you and none of them worked, and finally I found a shortcut: use docker images I can use the But there is still a problem that after using the docker image, it is not very convenient to install a new python package. You need to manually build a new image based on this image with the python packages you need |
Can you please fork it? I also want to install mxnet 1.6. Thanks |
Did you successfully install by adjusting these two files What should I do? |
any news please ? |
@joelteply |
I've been trying to install MxNet and GluonCV on a M1 Mac, and I'm using Miniconda, which supposedly supports arm-based packages installations.
I tried a couple of approaches so far, without any success
Installation with pip
I created the env by:
and installed mxnet by:
I also tried specifying
But the result is always the same, when importing mxnet I get the error:
During the installation, I see that it's doing:
So, I assume there's an error in the mxnet-1.6.0-py2.py3-none-any.whl file, which is actually not a Mac-compatible version?
Then, I tried building it from source
I followed the instructions on this page, which seemed to work, I built and installed MxNet 2.0.0.
My problem now is to install GluonCV as well. I tried installing it with pip, and everything seemed to work as well. But then when , when running a simple object detection script, I got the error:
RuntimeError: Legacy mxnet==2.0.0 detected, some modules may not work properly. mxnet>=1.4.0,<2.0.0 is required. You can use pip to upgrade mxnet "pip install -U 'mxnet>=1.4.0,<2.0.0'" or "pip install -U 'mxnet-cu100>=1.4.0,<2.0.0'"
(I also tried building Gluoncv from source as well, but I'm getting the same error, the issue seems to be the MxNet version)
1 error generated. make[2]: *** [3rdparty/mkldnn/src/cpu/CMakeFiles/dnnl_cpu.dir/jit_utils/jitprofiling/jitprofiling.c.o] Error 1 make[1]: *** [3rdparty/mkldnn/src/cpu/CMakeFiles/dnnl_cpu.dir/all] Error 2 make: *** [all] Error 2
so, I modified the config.cmake file (copied from config/darwin.cmake to the root folder), by setting:
set(USE_MKL_IF_AVAILABLE OFF CACHE BOOL "Use Intel MKL if found") set(USE_MKLDNN OFF CACHE BOOL "Build with MKL-DNN support")
but now it seems it got even worse (always after running "cmake --build ."):
fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make[2]: *** [CMakeFiles/mxnet_static.dir/src/api/_api_internal/_api_internal.cc.o] Error 1 make[1]: *** [CMakeFiles/mxnet_static.dir/all] Error 2 make: *** [all] Error 2
Originally posted by @LewsTherin511 in #20650 (comment)
The text was updated successfully, but these errors were encountered: