I'm having some difficulty understanding what is causing my "Bad CPU type in executable" error when using conda. This error occurs on several of my terminal commands, but I'll illustrate it below on "conda":

$ brew install anaconda 
....(works successfully, and installs in PREFIX=/opt/homebrew/anaconda3) 
$ conda 
__conda_exe:1: no such file or directory: /usr/local/Caskroom/mambaforge/base/bin/conda 
$. /opt/homebrew/anaconda3/bin/conda  
(...as expected, returns usage info)
$ /opt/homebrew/anaconda3/bin/conda create -n new_env python=3.12 anaconda 
returns "Bad CPU executable" 

You can see that when I give it the explicit path to conda (/opt/homebrew/anaconda3/bin/conda), it seems to recognize it, but then causes errors downstream when I try to run specific commands.

I've seen the answers zsh: bad CPU type in executable: ngrok and zsh: bad CPU type in executable . However, the answers aren't consistent, and none of them seem to address changes that might have been introduced by the new M3 chip.

EDIT/UPDATE: I got a little bit closer by doing the following:

  1. export PATH='/opt/homebrew/anaconda3/bin:$PATH'
  2. conda init zsh
  3. restarting my zsh shell

After doing those things, then at least the shell recognizes the commands brew and conda. However, when I try again to use conda to create a new virtual environment:

  • I use "conda create -n new_env python=3.12 anaconda"
  • And at first it appears to be working fine, until I see the following:
ERROR conda.core.link:_execute(945): An error occurred while installing package 'defaults::python.app-3-py312h80987f9_0'.                                              
Rolling back transaction: done                                                                                                                                         
[Errno 86] Bad CPU type in executable: '/usr/local/bin/bash'                                                                                                           

There must be a system-wide issue going on here. What can I do about this?

  • This is usually some Intel code that hasn't been recompiled for AS.
    – benwiggy
    Commented May 19 at 7:13
  • Thanks @benwiggy. Is there an easy way to fix that?
    – somewhere
    Commented May 19 at 17:05
  • Run anaconda entirely in Rosetta. (assuming that everything is a Universal Binary with AS and Intel forks.)
    – benwiggy
    Commented May 19 at 17:18
  • Thanks. I got a little closer (see the EDIT/UPDATE:). How do I check if "everything is a Universal Binary with AS and Intel forks"?
    – somewhere
    Commented May 19 at 17:41
  • This is expected behavior - have you decided if you want to run in Rosetta or reinstall everything for the new architecture? If the former, these steps are needed to validate your plan.
    – bmike
    Commented May 19 at 17:50


You must log in to answer this question.

Browse other questions tagged .