MxNet installation on M1 Mac with Miniconda - (not a mach-o file) Error

Hi’ I’ve been tryig to install MxNet on a M1 Mac, and I’m using Miniconda, which supposedly supports arm-based packages installations.

I created the env by:

conda create --name mc_mxnet_py39 python=3.9

and installed mxnet by:

pip install --upgrade mxnet

I also tried specifying

CONDA_SUBDIR=osx-arm64 pip install --upgrade mxnet

But the result is always the same, when importing mxnet I get the error:

OSError: dlopen(/Users/cdemasi/miniconda3/envs/mc_mxnet_py39/lib/python3.9/site-packages/mxnet/libmxnet.so, 0x0006): tried: '/Users/cdemasi/miniconda3/envs/mc_mxnet_py39/lib/python3.9/site-packages/mxnet/libmxnet.so' (not a mach-o file)

During the installation, I see that it’s doing:

Collecting mxnet
Using cached mxnet-1.6.0-py2.py3-none-any.whl (68.7 MB)

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?

Are you able to solve this issue?

Not yet, at least not completely. I opened an issue regarding this problem, but I’ve been mostly ignored so far.
As you can read there, I was able to compile MxNet 2.0.0, so maybe that is gonna solve your problem.

1 Like

Quite Helpful, but some commands are still not working for me :slightly_frowning_face: Anyways, Thanks! Do share if you find any other solution.