Skip to content

Making Our Conda Environment

Now that we have Mini-forge, we can start installing Conda packages. To know what packages we can install, we got to find a list of all available packages. One such list, for conda-forge, can be found here.

If we select the osx-arm64 tab, we can further see what packages have arm (M1) integration.
As can be noted, the packages we need (eg. gazebo) are not under this tab.

Indeed, if we run conda install gazebo we get the following error:

1
2
3
PackagesNotFoundError: The following packages are not available from current channels:

  - gazebo

We need to create a osx-64 environment, this can easily be done.
However, before we can move onwards, we need some preparation.


Setting Up An Intel Conda Environment

In this step, we set up an appropriate "anaconda environment" that ensures only versions of libraries compatible with M1 are installed.

Following this git issue The solution posted by isuruf worked great for me.

Warning

The official instructions indicate using python version 3.7. I've had problems with 3.7, particularly with MultiNEAT, so a safer option, in this case, is Python 3.8

Create a Python environment called ec-64:

1
CONDA_SUBDIR=osx-64 conda create -n ec-64 python=3.8 -y

Activate the newly created env:

1
conda activate ec-64

Check if Python recognizes the correct OS version:

1
python -c "import platform;print(platform.machine())"

1
2
# Expected output:
    x86_64

Set the correct CONDA_SUBDIR configuration variable:

1
conda env config vars set CONDA_SUBDIR=osx-64

1
2
# Expected output:
    To make your changes take effect please reactivate your environment

Deactivate env and re-activate to ensure changes take effect:

1
conda deactivate && conda activate ec-64

Check that the configuration variable is properly set:

1
echo "CONDA_SUBDIR: $CONDA_SUBDIR"

1
2
# Expected output:
  CONDA_SUBDIR: osx-64

Creating an isolated conda env is done