miniconda installation issue on iMac with Apple M1 chip running macOS Big Sur
Asked Answered
C

4

11

I am trying to install Miniconda on my new iMac. I have installed Miniconda on an older macOS system before with no problems, but I am having difficulty with this new computer/system.

The computer is an iMac with the Apple M1 chip running macOS Big Sur (version 11.3).

I downloaded the latest miniconda installer and ran the following code: bash Miniconda3-latest-MacOSX-x86_64.sh

This results in the following warning:

WARNING: Your operating system appears not to be 64-bit, but you are trying to install a 64-bit version of Miniconda3. Are sure you want to continue the installation? [yes|no]

I am not sure why it is saying that I don't have a 64-bit system - my understanding is that starting with macOS Catalina, everything should be 64-bit (but may be I am wrong?).

I searched around on the internet, but didn't find a solution, so thought I would try installing it anyway just to see what happens. It does not complete the install. I followed the prompts, but at some point, you get this:

[/Users/jenniferweinert/miniconda3] >>>

PREFIX=/Users/jenniferweinert/miniconda3

Unpacking payload ...

Miniconda3-latest-MacOSX-x86_64.sh: line 411: /Users/jenniferweinert/miniconda3/conda.exe: Bad CPU type in executable

Miniconda3-latest-MacOSX-x86_64.sh: line 413: /Users/jenniferweinert/miniconda3/conda.exe: Bad CPU type in executable

Most of what I have found about issues with miniconda (or anaconda) and macOS (Catalina or Big Sur) relates to the differences between bash and zsh and the two extra lines of code that you need to activate miniconda/anaconda. But I can't even get to that point because I cannot get Miniconda installed!

I was able to install home-brew and then tried the silent installation. But that ended up at the same point, unable to install due to the bad cpu type in executable.

Someone mentioned to me that this might be due to the M1 chip in this computer, but did not have a work-around or solution to suggest.

If anyone can offer any help with this, I would really appreciate it! Also, if there is any additional information that I should provide in order for you to help, just let me know.

Thank you!

Cynth answered 16/6, 2021 at 16:33 Comment(0)
F
6

I ran into the same issue. Make sure you download "Miniconda3 macOS Apple M1 ARM 64-bit bash" instead of "Miniconda3 macOS 64-bit bash" from the installer webpage.

Flowery answered 21/2, 2022 at 17:17 Comment(2)
I had the exact opposite problem I got this "This package is incompatible with this version of macOS" when I tried to run the pkg version. For reference, I'm running a Mac with an M1 chip. To get it to work, I downloaded the bash version, changed to the Downloads directory cd Downloads, added the executable with chmod +x Miniconda3-latest-MacOSX-arm64.sh. Ran it with ./Miniconda3-latest-MacOSX-arm64.sh ran through the installation prompts and it worked like a charm. conda --version now works and I haven't had any problems.Pollaiuolo
@Pollaiuolo Thanks for your helpful answer, it solved my problem and worked like a charm! This would be the answer and i'll definitely recommend it to others.Doti
C
2

I encountered the same problem with the downloaded ".bash" script. But the ".pkg" installer worked fine.

Colonel answered 10/7, 2021 at 19:2 Comment(2)
I followed your advice, but I'm starting to get the impression that this is simply a build for x86 and that I'm getting x86 accordingly (instead of the arm64 ones that I would like). Do you know more about this?Manet
Sorry, I don't. But the .pkg installer did work for my M1 Mac.Colonel
H
2

In fact, it is a OS default problem. That problem means that your Mac is not seeing Rosetta at first because you haven't used an application made for Intel chips yet.

To solve the problem, just initialize the .pkg, so that Mac asks you to install Rosetta (Just a one life thing).

https://support.apple.com/en-us/HT211861

Install Rosetta, exit installation from the .pkg and then you can bash Miniconda3-latest-MacOSX-x86_64.sh as usual.

You can also continue the installation with the .pkg installer, but I don't personally like it because it puts it into the /opt/miniconda3 folder by default and it doesn't asks you about the conda init script written into the .zshrc file.

This is important if you want to have both miniconda and miniforge as two separated instances.

https://www.youtube.com/watch?v=w2qlou7n7MA&list=RDCMUCR1-GEpyOPzT2AO4D_eifdw&index=1

Let us hope M1 chip developers keep working hard so that we will only use miniforge in the future to take all the juice from the M1 chip with GPU available!

Hapte answered 28/11, 2021 at 14:57 Comment(1)
It worked like charm. The only actual solution I found.Volitive
R
0

Better than installing Miniconda, it is recommended to install ...Miniforge.

Miniforge is a conda implementation from the conda-forge channel, and you can get installers for several platforms including Apple Silicon on this miniforge github.

Miniforge searches automatically for package wheels which are dedicated to Apple Silicon.

Robison answered 16/12, 2021 at 6:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.