Is nomkl still recommended for OMP issue on Mac?

Hi, I’ve seen this covered on SO but there’s a lot of contradictory info so hoping a best practice exists among users here.

MacOs 12.4 on 2016 MacBook Pro (16Gb, 2.7GHz)
Clean install of Anaconda then installed PyTorch per Getting Started

conda create --prefix ./envs
conda install pytorch torchvision torchaudio -c pytorch
conda install ipython ipykernel
conda install matplotlib

Working in VSCode. Above python env activated/selected for notebooks
Was able to run all the .ipynb notebooks from “Introduction to PyTorch” tutorials

Trying to run the notebook for What is torch.nn really? — PyTorch Tutorials 1.12.0+cu102 documentation
led to kernel crash with no meaningful error at:

import torch

x_train, y_train, x_valid, y_valid = map(
    torch.tensor, (x_train, y_train, x_valid, y_valid)
n, c = x_train.shape
print(x_train, y_train)
print(y_train.min(), y_train.max())

Ran the commands from an ipython session and got this error:
OMP: Error #15: Initializing libiomp5.dylib, but found libomp.dylib already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see Intel® Product Support

I saw proposed solution to use:

conda install nomkl
I gave this a shot but it failed with conflicts in my environment so looking to see if this is the right track.

I had some progress here, at least addressing the kernel crash with the above tutorial code. A fresh conda install as below appeared to work. It’s still a bit unclear to me why it works, because the PyTorch install did list an mkl package as being installed and I see it in the environment package list. I would have thought installing the mutex package “nomkl” would have forced everything to be an OpenBlas per:

In any case, if a moderator/admin type sees this: would be great to make this all really explicit in a MacOs subsection of getting started pathway.

conda create --prefix ./envs nomkl
conda activate ./envs
conda install pytorch torchvision torchaudio -c pytorch
conda install ipython ipykernel


conda list|grep mkl
mkl 2022.0.0 hecd8cb5_105
nomkl 3.0 0