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

Install Broken on M2 Mac #76

Open
josephdviviano opened this issue Jan 23, 2024 · 5 comments
Open

Install Broken on M2 Mac #76

josephdviviano opened this issue Jan 23, 2024 · 5 comments

Comments

@josephdviviano
Copy link

Hello, I'm unable to install this tool. Please advise.

(anarci) jdv@delarge ~/code/ANARCI:
pip install .
Processing /Users/jdv/code/ANARCI
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: anarci
  Building wheel for anarci (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [613 lines of output]
      /Users/jdv/miniconda3/envs/anarci/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
      !!
      
              ********************************************************************************
              Please avoid running ``setup.py`` directly.
              Instead, use pypa/build, pypa/installer or other
              standards-based tools.
      
              See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
              ********************************************************************************
      
      !!
        self.initialize_options()
      INFO: ANARCI lives in:  /Users/jdv/miniconda3/envs/anarci/lib/python3.10/site-packages/anarci
      INFO: Downloading germlines from IMGT and building HMMs...
      INFO: running 'RUN_pipeline.sh', this will take a couple a minutes.
      Parsed and saved Homo+sapiens HV
      Parsed and saved Mus HV
      Parsed and saved Rattus+norvegicus HV
      Parsed and saved Oryctolagus+cuniculus HV
      Parsed and saved Macaca+mulatta HV
      Parsed and saved Sus+scrofa HV
      Parsed and saved Vicugna+pacos HV
      Parsed and saved Bos+taurus HV
      Parsed and saved Homo+sapiens HJ
      Parsed and saved Mus HJ
      Parsed and saved Rattus+norvegicus HJ
      Parsed and saved Oryctolagus+cuniculus HJ
      Parsed and saved Macaca+mulatta HJ
      Parsed and saved Sus+scrofa HJ
      Parsed and saved Vicugna+pacos HJ
      Parsed and saved Bos+taurus HJ
      Parsed and saved Homo+sapiens KV
      Parsed and saved Mus KV
      Parsed and saved Rattus+norvegicus KV
      Parsed and saved Oryctolagus+cuniculus KV
      Parsed and saved Macaca+mulatta KV
      Parsed and saved Sus+scrofa KV
      Parsed and saved Bos+taurus KV
      Parsed and saved Homo+sapiens KJ
      Parsed and saved Mus KJ
      Parsed and saved Rattus+norvegicus KJ
      Parsed and saved Oryctolagus+cuniculus KJ
      Parsed and saved Macaca+mulatta KJ
      Parsed and saved Sus+scrofa KJ
      Parsed and saved Bos+taurus KJ
      Parsed and saved Homo+sapiens LV
      Parsed and saved Mus LV
      Parsed and saved Rattus+norvegicus LV
      Parsed and saved Oryctolagus+cuniculus LV
      Parsed and saved Macaca+mulatta LV
      Parsed and saved Sus+scrofa LV
      Parsed and saved Bos+taurus LV
      Parsed and saved Homo+sapiens LJ
      Parsed and saved Mus LJ
      Parsed and saved Rattus+norvegicus LJ
      Parsed and saved Oryctolagus+cuniculus LJ
      Parsed and saved Macaca+mulatta LJ
      Parsed and saved Sus+scrofa LJ
      Parsed and saved Bos+taurus LJ
      Parsed and saved Homo+sapiens AV
      Parsed and saved Mus AV
      Parsed and saved Homo+sapiens AJ
      Parsed and saved Mus AJ
      Parsed and saved Homo+sapiens BV
      Parsed and saved Mus BV
      Parsed and saved Homo+sapiens BJ
      Parsed and saved Mus BJ
      Parsed and saved Homo+sapiens GV
      Parsed and saved Mus GV
      Parsed and saved Homo+sapiens GJ
      Parsed and saved Mus GJ
      Parsed and saved Homo+sapiens DV
      Parsed and saved Mus DV
      Parsed and saved Homo+sapiens DJ
      Parsed and saved Mus DJ
      
      Formatting alignments
      
      IGs
      Homo_sapiens H
      Homo_sapiens K
      Homo_sapiens L
      Mus H
      Mus K
      Mus L
      Rattus_norvegicus H
      Rattus_norvegicus K
      Rattus_norvegicus L
      Oryctolagus_cuniculus H
      Oryctolagus_cuniculus K
      Oryctolagus_cuniculus L
      Macaca_mulatta H
      Macaca_mulatta K
      Macaca_mulatta L
      Sus_scrofa H
      Sus_scrofa K
      Sus_scrofa L
      Vicugna_pacos H
      Bos_taurus H
      Bos_taurus K
      Bos_taurus L
      
      TRs
      Homo_sapiens A
      Homo_sapiens B
      Homo_sapiens G
      Homo_sapiens D
      Mus A
      Mus B
      Mus G
      Mus D
      
      Warning - this alignment doesn't feature CYS at position 23 and/or position 104.
      EIVLTQS.PAVLSMAPKERVTITCQASQNI......NKWLAWYHQEPGRAPKLLIYEA.......SKLITGVP.SRFSGSG..SGTDFTLTISSLEPEDAGTYYCLQS,('Mus', 'K'),('Mustela putorius furo_JIRA1106', 'IGKV1-63*01')
      Warning - this alignment doesn't feature CYS at position 23 and/or position 104.
...
      EIVLTQSPAFRSVTLKEKVT.ITCQASQSI......GSSLHWYQQKPDQSPKLLIKYA.......SQSISGVP.SRFSGSG..SGTDFTLTINSLEAEDAATYYCQQS,('Macaca_mulatta', 'K'),('Macaca mulatta_AG07107', 'IGKV6-55*01')
      Traceback (most recent call last):
        File "/Users/jdv/code/ANARCI/build_pipeline/./FormatAlignments.py", line 480, in <module>
          main()
        File "/Users/jdv/code/ANARCI/build_pipeline/./FormatAlignments.py", line 454, in main
          jalignments = format_j_genes(jalignments)
        File "/Users/jdv/code/ANARCI/build_pipeline/./FormatAlignments.py", line 179, in format_j_genes
          pr = Popen( [ "muscle_macOS", "-in", ffile, "-gapopen", "-10", "-out", al_filename, ], stdout=PIPE, stderr=PIPE )
        File "/Users/jdv/miniconda3/envs/anarci/lib/python3.10/subprocess.py", line 971, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "/Users/jdv/miniconda3/envs/anarci/lib/python3.10/subprocess.py", line 1863, in _execute_child
          raise child_exception_type(errno_num, err_msg, err_filename)
      FileNotFoundError: [Errno 2] No such file or directory: 'muscle_macOS'
      Alignment input open failed.
         couldn't open ./curated_alignments/ALL.stockholm for reading
      
      Error: File existence/permissions problem in trying to open HMM file ./HMMs/ALL.hmm.
      HMM file ./HMMs/ALL.hmm not found (nor an .h3m binary of it)
      
      
      error: [Errno 2] No such file or directory: 'curated_alignments/germlines.py'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for anarci
  Running setup.py clean for anarci
Failed to build anarci
ERROR: Could not build wheels for anarci, which is required to install pyproject.toml-based projects
@eElor
Copy link

eElor commented Feb 21, 2024

Got same error using pyenv (Linux).

@josephdviviano, you can refer to issue #31.

In my case I installed muscle with my package manager (sudo apt install muscle; in your case you could use brew) and updated the path as described in the last comment in #31 (build_pipeline/FormatAlignments.py:181; in your case build_pipeline/FormatAlignments.py:179) with the path of the new muscle installation (sh: echo $(which muscle)).

Currently, I'm just testing anarci locally. But bug (? -> already mentioned in several issues; @broncio123) could make deployment pipeline of apps using anarci as dependency more complicated than necessary. Instead of installing it with a deployment script, like pip install git+https://github.com/oxpig/ANARCI, one would need to clone the repo manually, inspect the target system / container image, update named path, and copy again the cloned and updated repo into the target image.

@eElor
Copy link

eElor commented Feb 21, 2024

This bug is weird, since this repo includes a copy of muscle (bin/muscle and bin/muscle_macOS), and after installing anarci (modification above required), which muscle now points my pyenv dir (${HOME}/.pyenv/shims/muscle), which should have derived from the copy of muscle in this repo. Why is bin/muscle not correctly used from the beginning in setup.py? Using the new copy in shims seems to work correctly.

@eElor
Copy link

eElor commented Feb 21, 2024

Referencing the path to the muscle binary included in the repo in build_pipeline/FormatAlignments.py:181 lead to initial error.

@eElor
Copy link

eElor commented Feb 22, 2024

@broncio123 , I did further installation tests on my system by deleting and recreating my virtual environment. IMHO, muscle could be listed as a requirement for the installation of anarci as currently are hmmer and biopython.

I left build_pipeline/FormatAlignments.py:181 as it initially was, but deleted the muscle binaries included in bin/ and updated setup.py:49 to data_files = [ ('bin', ['bin/ANARCI']) ],. Now, the installation of muscle in my system is correctly recognized during setup and I can install anarci without errors.

Steps (Linux):

sudo apt install hmmer muscle 

git clone https://github.com/oxpig/ANARCI.git anarci
cd anarci
# update `setup.py:49` -> `data_files = [ ('bin', ['bin/ANARCI']) ],`

# --- 
# install pyenv -- not required, but is what I use locally. To be tested with --user/global installation or venv
pyenv install 3.11.7
pyenv virtualenv 3.11.7 anarci
pyenv activate anarci
# ---

pip install openmm biopython

python setup.py install

@ayansengupta17
Copy link

I was able to install on M2 mac. Let me know if you are still facing issues.

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

3 participants