Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch between miniforge (Apple Silicon build) and miniconda (Rosetta 2) #165

Open
fblamanna opened this issue Jun 13, 2021 · 8 comments
Open

Comments

@fblamanna
Copy link

I am just wondering how to have and switch between:

  1. miniforge3 with native support for apple silicon
  2. miniconda with all packages installed via Rosetta 2 emulation

on a Mac.
This is because some environment works well under M1, but for other packages (not yet supported) I have to install them via emulation on a classic miniconda environment.

Is there a method to install both (I guess so) and switch between then to update the terminal zsh shell?

@isuruf
Copy link
Member

isuruf commented Jun 13, 2021

CONDA_SUBDIR=osx-64 conda create -n rosetta python   # create a new environment called rosetta with intel packages.
conda activate rosetta
python -c "import platform;print(platform.machine())"
conda config --env --set subdir osx-64  # make sure that conda commands in this environment use intel packages

@fblamanna
Copy link
Author

Thanks it works, just some warnings aobut overwriting the system SUBDIR when switching between arm64 and osx-64 environments.

@hmaarrfk
Copy link
Contributor

Would you like to add a note in the readme explaining and documenting this others?

@avocardio
Copy link

Sorry this might be a stupid question, is there any way to just have miniforge and have it run all the non-supported packages through rosetta? I currently use anaconda3, don't really want to be switching between that and miniforge... how would I tell the environments apart?

@hmaarrfk
Copy link
Contributor

hmaarrfk commented Jul 3, 2021

Are you trying to run one program (single address space) that is dynamically linked to both x86 code (through Rosetta) and aarch64 code (native)?

@ollie-bell
Copy link

ollie-bell commented Dec 23, 2021

CONDA_SUBDIR=osx-64 conda create -n rosetta python   # create a new environment called rosetta with intel packages.
conda activate rosetta
python -c "import platform;print(platform.machine())"
conda env config vars set CONDA_SUBDIR=osx-64  # make sure that conda commands in this environment use intel packages
conda deactivate rosetta
conda activate rosetta
echo "CONDA_SUBDIR: $CONDA_SUBDIR"

So, just to be explicitly clear, is this supposed to work if you only have Miniforge for arm64 installed? i.e. you do not need a separate installation for Miniconda or Anaconda?

@BastianZim
Copy link
Member

BastianZim commented Dec 23, 2021

Yes your current setup (Just Miniforge for Apple Silicon) should be sufficient. You don't need to have a second installation. This will be activated per environment.

@ricardowiseverge
Copy link

I've managed to create the environment but when I run jupyter lab the correct kernel doesn't appear.

I've 2 python installed one on M1 and another on rosetta2 because I've specific packages that don't support M1 architecture.

So, I'm running those commands on a Rosetta2 terminal and it can't find the correct kernel version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

7 participants