DEV Community

Cover image for Bioinformatics: PackagesNotFoundError on osx-arm64 Platform
Awosise Oluwaseun
Awosise Oluwaseun

Posted on

Bioinformatics: PackagesNotFoundError on osx-arm64 Platform

I was following the Biostar Handbook up until where I was supposed to create an environment and install the Bioinformatics tools required for the rest of the project when I encountered the error that brought you here: PackagesNotFoundError.
I had to surf the internet for solutions, and I found bits and pieces of them, which took quite some time. Don't worry; all of the research has been done to streamline the implementation process for you, allowing you to save more time.

Why the Error
The error is a result of the architecture/platform (osx-arm64) introduced to the M-chip MacBook systems, as opposed to the osx-64 platform in the preceding Intel versions. The packages obtained from channels like conda-forge and bioconda are not yet available on the osx-arm64 platform, hence the error.

The Solution
The solution is to find a way to set the platform for the environment created to osx-64 platform (which has all the required packages downloadable via the channels) by following the steps below in this order:

  1. Install miniconda.
  2. Add channels to fetch packages like bioconda and conda-forge to the base environment in that order using conda config --add channels bioconda and conda config --add channels conda-forge.
  3. Create an environment, e.g., bioinfo, using the code line conda create --name bioinfo -y. This is done to containerize the packages to avoid conflicts like version conflicts.
  4. Activate the created environment using conda activate bioinfo.
  5. After that, set your environment platform to osx-64 instead of the default osx-arm64 to enable the installation of packages, as they have not yet been migrated to the osx-arm64 platform. The CLI command used is: conda config --env --set subdir osx-64.
  6. Then, install the required package, specifying the version if needed. For example, to install Python version 3.6 on the environment, use the command conda install python=3.6.
  7. Finally, install all the tools required for bioinformatics in the environment using curl http://data.biostarhandbook.com/install/conda.txt | xargs conda install -y.

Top comments (0)