![]() ![]() ![]() The differences between miniforge and miniconda are described well in this stackoverflow post. Next, we’ll install miniforge3 to be used in the arm64 terminal, and minicoda3 to be used in the x86 terminal. Step 2: Install miniforge3 arm64 and miniconda3 x86 This post assumes that zsh, xtools, and rosetta are already installed and configured…mostly because I had been using my M1 laptop for months before I embarked on finding a solution to my problems, and I already had these tools set up. I also provide links to other solutions at the bottom, including how to have one version of conda with separate arm64 and x86 environments. This blog post covers how to get the best of both worlds by installing two versions of conda, one for arm64 and one for x86. At the same time, some packages have released arm64-compatible installations, and many of these have benefits such as offering access to GPUs (see here). ![]() However many of my favorite scienitific software packages were not available in conda for the arm64 architecture (ex. I almost exclusively use (mini)conda to manage software installations because it deals with dependency issues, improves reproducibility and portability of software environments, and integrates seamlessly with workflow automation software that I use frequently. This post was motivated by my own struggles with the M1 chip. This blog post describes how to install two side-by-side, non-conflicting versions of conda to manage arm64 and x86 installations separately. To circumvent this issue, Mac built Rosetta, a translator that enables software built for an Intel chip ( x86) to run on the M1 chip ( arm64). However, a lot of software, especially scientific research software, is not natively installable on the M1 architecture. They have a lot of benefits, including better battery life and access to GPUs. (Imagine having to keep all of these updated and working compatibly with one another on your computer! This is the true utility of a conda environment it takes care of this for you.The new(ish) Mac M1 chips are different from Intel chips that Mac used to use. These are all the packages that conda installed to get NCO on my computer. This is an example for the ncl_stable environment. For NCO and other fairly specific software packages, conda will typically need the conda-forge channel. For packages with nothing under the “Channel” column, they were installed using the defaults channel. This conveniently lists the packages installed in the current environment, their version and build information, and the channel used to install them. To see which channels were used to install your conda packages, type conda list. Note the -c in -c conda-forge means “channel.” What this does is tells conda to look in the “conda-forge” channel (which hosts a broader range of user-created packages and unofficial versions of packages within the defaults channel). You can name them anything you like, though. I like to use the _stable suffix because it helps me mentally separate an environment related to NCO from the language itself. To create these environments yourself (base is the default, so no need to make that), follow the steps below. conda environmentīasmap (assuming you have cartopy in your base environment) I’ve learned the setup below works best for me. You could get away with combining some of them into the same one below (and I encourage you to try, because you’ll learn a lot about conda when you run into issues and have to resolve them). I typically keep at least four separate environments on a machine (in addition to the default), described below. That’s at least what I did, and I was able to finish projects that I had started with basemap but start new ones in cartopy. The solution: Install a separate cartopy environment to get used to it, and once you feel confident, change your base environment to cartopy and create a basemap_stable environment for basemap-specific tasks. Its replacement is officially cartopy, but when you try to install them both, their packages can conflict. For example, if you use basemap for plotting maps, you may have heard it’s being retired in the next couple years (see also this discussion). Installing an environment is also a great way to make the switch to a new Python library or package without breaking your installation for all your current scripts. This tells me that I currently only have a base environment, and it’s installed on my home directory at /Users/baird/miniconda3. Vcv076219:python-for-climate-scientists baird$ ![]()
0 Comments
Leave a Reply. |