Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear instructions on how to install on Mac with M1? #51

Open
evabalini opened this issue May 3, 2023 · 6 comments
Open

Clear instructions on how to install on Mac with M1? #51

evabalini opened this issue May 3, 2023 · 6 comments

Comments

@evabalini
Copy link

Hi, a month ago I managed to install ANARCI on a MacBook Pro M1 (MacOS Monterey) through a dedicated terminal that opens with Rosetta 2.

However, after somehow messing up my conda environment, I decided to start fresh with a new environment and that meant I needed to re-install ANARCI.
Unfortunately, this time it's not possible to work with it.

I reach up to the hmmer installation point (which is the main dependency and is completed with no problems) and then when I install ANARCI from the setup.py (I run python setup.py install) I can't seem to import it from inside a python file (I get an error about architecture and stuff).
However, when I do conda list or pip list, I can see it listed there.

I was wondering if you've tried it and/or if you have any advice on how to do it?
I am afraid I might have done something wrong with the installation of biopython.

Also, which is the most correct way to install it? Is it through pip install anarci, conda install -c bioconda anarci or through the setup.py method?

Many many thanks in advance!

@FBoyles
Copy link
Member

FBoyles commented Jul 12, 2023

We do not develop or test on MacOS, much less on M1 chips, so cannot reproduce or debug any MacOS-specific problems.

I was wondering if you've tried it and/or if you have any advice on how to do it?

conda install -c bioconda hmmer
conda install -c conda-forge biopython
python setup.py install

I can't say anything about whether your problem is a result of a failed biopython installation or an error installing anarci without more information. Please verify your biopython installation and provide the full output from python setup.py install.

Also, which is the most correct way to install it? Is it through pip install anarci, conda install -c bioconda anarci or through the setup.py method?

Please use the setup.py script. We plan on creating a conda package in future, but other improvements are higher priority. Please note that the bioconda anarci package was created ~2 years ago by an unaffiliated third party and is not maintained by us.

@evabalini
Copy link
Author

@FBoyles thank you for the answer. The truth is I did finally find a way to install ANARCI on my M1, using Rosetta and a few other tricks. It's a whole process but I am willing to write it down here to help others that might have the same problem.

@NgYanHo
Copy link

NgYanHo commented Nov 22, 2023

@FBoyles thank you for the answer. The truth is I did finally find a way to install ANARCI on my M1, using Rosetta and a few other tricks. It's a whole process but I am willing to write it down here to help others that might have the same problem.

Please include your installation process. My device is preventing me from running setup.py.

@evabalini
Copy link
Author

evabalini commented Nov 22, 2023

@NgYanHo

  1. Open terminal

  2. Install rosetta
    /usr/sbin/softwareupdate --install-rosetta --agree-to-license

  3. Hit command + space and on the search bar search for 'Automator'

  4. Click on 'Application' and then 'Choose'

  5. Search for 'Shell' on the search bar and click on 'Run Shell Script'

  6. Delete cat on the text editor and paste:
    osascript -e 'tell app "Terminal"
    do script "arch -x86_64 zsh"
    end tell'

  7. Hit Command+S to save and save it under a distinct name (mine is ‘RosettaTerminal’ for example) in Applications folder.

  8. Go to Applications > right click on RosettaTerminal (or any other name you gave it) > Get Info and tick ‘Open using Rosetta’

  9. Close info and double click to launch RosettaTerminal

  10. Preferably start with a clean new conda environment and install python
    conda install python=3.10.0 (this version works for me with ANARCI, I don't know about later versions, sorry)

  11. Install biopython
    pip3 install biopython

  12. Install HMMER
    One way is:
    wget http://eddylab.org/software/hmmer/hmmer-3.3.2.tar.gz
    tar xf hmmer-3.3.2.tar.gz
    cd hmmer-3.3.2
    ./configure
    or:
    arch -arm64 brew install hmmer

  13. Then, run:
    make
    make check
    make install

  14. Optionally, check the installation is done:
    arch -arm64 brew install hmmer

  15. Then, finally(!) install ANARCI:
    git clone https://github.com/oxpig/ANARCI.git
    cd ANARCI
    python setup.py install
    It’s better to first install ANARCI and then other libraries, such as NumPy, pandas etc.

  16. Check it works by running:
    ANARCI -i <your sequence goes here>
    The command above should return the numbering.

I hope that works!

@NgYanHo
Copy link

NgYanHo commented Nov 22, 2023

@NgYanHo

  1. Open terminal
  2. Install rosetta
    /usr/sbin/softwareupdate --install-rosetta --agree-to-license
  3. Hit command + space and on the search bar search for 'Automator'
  4. Click on 'Application' and then 'Choose'
  5. Search for 'Shell' on the search bar and click on 'Run Shell Script'
  6. Delete cat on the text editor and paste:
    osascript -e 'tell app "Terminal"
    do script "arch -x86_64 zsh"
    end tell'
  7. Hit Command+S to save and save it under a distinct name (mine is ‘RosettaTerminal’ for example) in Applications folder.
  8. Go to Applications > right click on RosettaTerminal (or any other name you gave it) > Get Info and tick ‘Open using Rosetta’
  9. Close info and double click to launch RosettaTerminal
  10. Preferably start with a clean new conda environment and install python
    conda install python=3.10.0 (this version works for me with ANARCI, I don't know about later versions, sorry)
  11. Install biopython
    pip3 install biopython
  12. Install HMMER
    One way is:
    wget http://eddylab.org/software/hmmer/hmmer-3.3.2.tar.gz
    tar xf hmmer-3.3.2.tar.gz
    cd hmmer-3.3.2
    ./configure
    or:
    arch -arm64 brew install hmmer
  13. Then, run:
    make
    make check
    make install
  14. Optionally, check the installation is done:
    arch -arm64 brew install hmmer
  15. Then, finally(!) install ANARCI:
    git clone https://github.com/oxpig/ANARCI.git
    cd ANARCI
    python setup.py install
    It’s better to first install ANARCI and then other libraries, such as NumPy, pandas etc.
  16. Check it works by running:
    ANARCI -i <your sequence goes here>
    The command above should return the numbering.

I hope that works!

Much appreciated. Will try this.

@JoshuaMeyers
Copy link

I am on an M2 mac, the reason it doesn't work is because the correct hmmer binaries on bioconda are not there. So you can install from brew instead (and I install biopython using pip because its simpler). Hope that helps

conda create -n anarci python=3.10 -y
conda activate anarci
conda install -c conda-forge openmm pdbfixer -y
brew install hmmer
pip install biopython

git clone https://github.com/oxpig/ANARCI.git
cd ANARCI
python setup.py install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants