Installing PEAR on Apple Silicon (M1 or M2 running Ventura)

294 views
Skip to first unread message

Stephan Bitterwolf

unread,
Aug 21, 2023, 8:05:00 PM8/21/23
to pear-users
If you are reading this post you probably ran into an issue installing PEAR on your apple silicon based mac... Not to worry! I ran into the same issue and spent a lot of time fixing an error I got trying to install the program.

Here is how I fixed it in August of 2023 for pear 0.9.6:

1. Follow the instructions here to create an "intel" environment in your terminal.
2. Install homebrew inside of the intel environment (instructions in the link above)
3. Install miniconda with homebrew "brew install miniconda" (just be sure that you are using the intel version - you can check by typing "arch" and it should say something like "i386")
4. Once conda is installed, follow the instructions for adding the bioconda libraries: link here
5. Then update conda with the command "conda update conda" say yes to the updates
6. Install the PEAR package on bioconda by typing "conda install pear"
7. After the installation is complete, you should see a message appear after typing "pear" (if you get an error keep reading)
8. You are done. 
9. When you are done with using PEAR you can return to the arm terminal by typing arm (this assumes that you set up the aliases as instructed in step 1). Alternatively, close the terminal and reopen it. This should automatically be an ARM based terminal and you can check by typing "arch" and confirming a message like "arm64"

Note: if you get an error saying that pear doesn't exist but conda says it does (you can check installed conda packages with this command "conda list"), then you need to add some paths to your .zshrc file. To do this:
1. Navigate to your home folder using finder.
2. Show hidden files: press shift + command + period
3. Open the now visible .zshrc file using BBEdit or some other text editor and add: the below lines, save the file, restart the terminal, switch to intel, and then run pear
               export PATH="/usr/local/bin:$PATH"
               export PATH="/opt/homebrew/bin:$PATH"
4. The lines above just tell your computer where to find the programs you installed. After doing that PEAR showed up for me.

I hope this helped!

Stephan
Reply all
Reply to author
Forward
0 new messages