I’m having difficulty installing the cf-python and cf-plot packages on my local machine. I’m working through VS Code on OSX with a conda environment at python version 3.11.
When I run conda install -c conda-forge cf-python cf-plot, the install fails saying that:
PackagesNotFoundError: The following packages are not available from current channels:
To search for alternate channels that may provide the conda package you’re
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
I have checked anaconda.org and cf-python is listed as one of the available packages through the anaconda forge channel so I’m at a loss as to why the package can’t be installed.
Can you offer any advice, please? Or point me in the direction of somebody who might be able to solve this problem?
I can’t recreate this locally, but have ideas as to what could be causing the failure for your system to recognise the package.
So I can confirm, please can you run, and share the output from, conda info in your active environment - and since you say you are using VS Code, I believe you may have to run it from the command palette so we can see the details about the exact environment there, rather than from the terminal.
Thanks for your response (command palette is a VS Code feature for running commands to pick up the environment VS Code uses, in short, but the terminal output is fine here since it looks like the environment you are using there anyway).
I see the issue: you are not using a compatible platform for your conda environment, since cf-python is only registered as being supported for linux-64 and osx64, but you are using platform : osx-arm64 (see ‘Installers’ listing under Cf Python | Anaconda.org). So that it why anaconda is telling you it is not available.
So you have two options, since you can use osx-64 with ARM processors, but note libraries set with that platform will likely run slower on your system:
You can create a whole new environment with a compatible platform of osx-64: conda create --platform osx-64 --name cf-compat-env and install cf-python and cf-plot from within that after activation.
Or you can install the cf-python library and dependencies only with that platform set using your current environment, by adding --platform osx-64 to your original command, and then it should work: conda install -c conda-forge --platform osx-64 cf-python cf-plot udunits2 (note you might need to add udunits2 to your original install instructions as well, since cf-python requires this.
I’ll look into why we don’t specify osx-arm64 as supported, as well, since perhaps we can include that on our ‘Installers’ list so that you would have been able to install directly for your osx-arm64-based env, but it may be due to it being much slower there.