404 error when trying to install from conda on MacOS

I’m trying to install mantid for use from the command line, but for some reason I can’t seem to get conda to find the repository. I’m running sonoma (14.1.1) on an M2 pro mac.

I’ve tried adding ‘mantid’ and ‘mantid :: Anaconda.org’ to my .condarc file without joy.
Here’s what happens

(base) ian.silverwood@NDW2542MAC ~ % conda create -n mantid_env -c mantid mantid
Collecting package metadata (current_repodata.json): failed

UnavailableInvalidChannel: HTTP 404 NOT FOUND for channel mantid <https://anaconda.org/mantid>

The channel is not accessible or is invalid.

You will need to adjust your conda configuration to proceed.
Use `conda config --show channels` to view your configuration's current state,
and use `conda config --show-sources` to view config file locations.

Hi Ian,

I’ve been unable to replicate this on my Mac running Ventura. I’m going to try upgrading to Sonama and see if this makes a difference - will get back to you.

In the meantime, it is worth trying the following command on your mac. This specifies explicitly to download the osx-64 mantid package. Due to the Rosetta translation layer this will still work on your M2 mac. We currently don’t release packages specially for ARM processors.
CONDA_SUBDIR=osx-64 conda create -n mantid_env -c mantid mantid

Hi Mial,

I get the same error for that command:

(base) ian.silverwood@NDW2542MAC anaconda3 % CONDA_SUBDIR=osx-64 conda create -n mantid_env -c mantid mantid
Collecting package metadata (current_repodata.json): failed

UnavailableInvalidChannel: HTTP 404 NOT FOUND for channel mantid <https://anaconda.org/mantid>

Hi Ian

Could you let me know what’s in your .condarc file?

It should contain (at least) this:

channels:
- conda-forge

or

channels: [conda-forge]

From my investigation, the error you’re experiencing occurs when the conda-forge entry is missing or malformed in the .condarc file.

Thanks,
Caila

Hi Caila,

The standard install just had - defaults

I then added

 - https://anaconda.org/mantid-
 -  mantid

I’ve now added conda-forge so my .condarc looks like:

channels:
  - defaults
  - https://anaconda.org/mantid
  - mantid
  - conda-forge

I’m afraid it is still not working, either with
CONDA_SUBDIR=osx-64 conda create -n mantid_env -c mantid mantid
or
conda create -n mantid_env -c mantid mantid

Hi Ian

Including the anaconda link in .condarc file will cause the 404 error to occur as well as not having conda-forge included. Your .condarc file should look like this:

channels: 
 - conda-forge
 - defaults

This should allow you to use the normal conda create -n mantid_env -c mantid mantid command to install Mantid. If not, we’ll need to investigate further.

Thanks Caila,

that seems to be working now.
Ian

1 Like

I started getting some annoying deprecation warnings that turned out to be me downloading the OSX (Intel) anaconda on my M2 Mac, so I switched to the OSX (ARM) build instead. This got rid of the warnings, but I then couldn’t download Mantid. I’m guessing this is due to the fact that Mantid is only built for Intel. It would be nice if you could also build for ARM, but I can work around it for the moment.

Hi Ian,

As you have noticed we currently only target our packages at macs with x86_64 processors, given that these packages are still usable on ARM macs due to Rosetta. We’re aware that at some point as mac users transition from being majority intel-based to majority ARM-based, we will have to change this approach to support both.

If you think this is worth prioritising I’d recommend getting in touch with the team at mantid-devops@mantidproject.org so that this can be championed at the Mantid Programme Board level. It’s a question of resource rather than willing!