How to set up a conda osx-64 environment on ARM mac?
Asked Answered
W

3

15

I have an M1 MacBook using conda through miniforge3.

I want to use some packages not built for ARM (ifcopenshell, pythonocc-core). Mixing channels (conda-forge/osx-64 and conda-forge/osx-arm) often does not work reliably.

How do I tell conda/mamba to have an environment only using x64? I don't want to install osx-64 conda in parallel.

Wavemeter answered 17/3, 2022 at 15:37 Comment(2)
@merv, you need to set --env to make that work only for that env. Otherwise it's a global setting. conda config --env --set subdir osx-64Montez
@Montez oops good catch - was a little hasty there. I cover this setting here (though, for win-32 / win-64 switching): https://mcmap.net/q/276069/-using-multiple-python-engines-32bit-64bit-and-2-7-3-5Dicarlo
M
31
  conda create -n intel_env
  conda activate intel_env
  conda config --env --set subdir osx-64
  conda install python

Or

  CONDA_SUBDIR=osx-64 conda create -n intel_env python
  conda activate intel_env
  conda config --env --set subdir osx-64
Montez answered 21/3, 2022 at 7:47 Comment(2)
This is the answer. Works for me and my environment is extremely complicated to configure.Americium
Adding to this comment, this also helps: vineethbharadwaj.medium.com/…Americium
T
4

Using micromamba it's as simple as adding --platform osx-64 to every invocation of micromamba:

micromamba create -n intel_env --platform osx-64 python

Micromamba is an alternative conda-env manager, supporting most conda commands with some slight differences. It's what's powering mamba v1 under the hood.

Tierza answered 22/1, 2024 at 12:8 Comment(0)
A
-1

micromamba allows to specify platform directly, so it could be installed under the "base" environment:

micromamba install <package_name> --platform osx-64
Attributive answered 10/7, 2024 at 23:40 Comment(1)
there is no base environment in micromamba. what you suggest does not work at all. see error: ``` ❯ micromamba install python --platform osx-64 info libmamba ****************** Backtrace Start ****************** error libmamba No target prefix specified critical libmamba Aborting. info libmamba ****************** Backtrace End ******************** ```Tierza

© 2022 - 2025 — McMap. All rights reserved.