Adding it to the bottom should (usually) work fine. zshrc file may have a lot of text in it already. We’ll use an if statement that evaluates the terminal architecture and then runs the corresponding conda initialization script. zshrc file so that it automatically initializes the correct conda when a new terminal is started (miniforge for arm64 and miniconda for x86). zshrc to automatically initialize the proper conda for each architecture Repeat the process of extracting the new initialization text, this time placing it in a file called ~/.start_miniconda3.sh. "/Users/reitert/miniconda3/etc/profile.d/conda.sh"Įxport PATH="/Users/reitert/miniconda3/bin:$PATH" _conda_setup="$('/Users/reitert/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)" The initialization script will add text that looks like this to your. "/Users/reitert/miniforge3/etc/profile.d/conda.sh"Įxport PATH="/Users/reitert/miniforge3/bin:$PATH"Īgain, follow the prompts to accept the licence, install, and initialize conda. _conda_setup="$('/Users/reitert/miniforge3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)" # !! Contents within this block are managed by 'conda init' !! The initialization script, conda init, will add the following text to your. Then, install miniforge (check here for the lastest version): curl -L > Miniforge3-MacOSX-arm64.shįollow the prompts to accept the licence, install, and initialize conda. ![]() We’ll start by installing miniforge for the arm64 terminal.įirst, make sure you’re using arm64 processor by running: uname -m However, we’ll still stick to using the miniforge installation for arm64, and the miniconda installation for x86. Now, both miniforge and miniconda provide one. Originally, an arm64-compatible version of conda was only provided by miniforge. Both miniforge and miniconda are minimal conda installers, but miniforge is a community-led effort (conda-forge) while miniconda is a company-led effort (anaconda). 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. The new(ish) Mac M1 chips are different from Intel chips that Mac used to use.
0 Comments
Leave a Reply. |