oxpig/ANARCI

Error during installation

Closed this issue · 5 comments

Following the instructions and trying to install with python setup.py install --user raises the following error;

Traceback (most recent call last):
  File "/Users/rodrigo/repos/HADDOCK-antibody-antigen/src/ANARCI/build_pipeline/./FormatAlignments.py", line 480, in <module>
    main()
  File "/Users/rodrigo/repos/HADDOCK-antibody-antigen/src/ANARCI/build_pipeline/./FormatAlignments.py", line 454, in main
    jalignments = format_j_genes(jalignments)
  File "/Users/rodrigo/repos/HADDOCK-antibody-antigen/src/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/rodrigo/software/anaconda3/envs/haddock-antibody/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/Users/rodrigo/software/anaconda3/envs/haddock-antibody/lib/python3.9/subprocess.py", line 1821, 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)


Traceback (most recent call last):
  File "/Users/rodrigo/repos/HADDOCK-antibody-antigen/src/ANARCI/setup.py", line 61, in <module>
    shutil.copy( "curated_alignments/germlines.py", ANARCI_LOC )
  File "/Users/rodrigo/software/anaconda3/envs/haddock-antibody/lib/python3.9/shutil.py", line 427, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/Users/rodrigo/software/anaconda3/envs/haddock-antibody/lib/python3.9/shutil.py", line 264, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: 'curated_alignments/germlines.py'

I guess this issue might be a duplicate of: #16

~/Programme/ANARCI$ sudo python setup.py install
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/anarci
copying lib/python/anarci/init.py -> build/lib.linux-x86_64-2.7/anarci
copying lib/python/anarci/anarci.py -> build/lib.linux-x86_64-2.7/anarci
copying lib/python/anarci/germlines.py -> build/lib.linux-x86_64-2.7/anarci
copying lib/python/anarci/schemes.py -> build/lib.linux-x86_64-2.7/anarci
running build_scripts
creating build/scripts-2.7
copying and adjusting bin/ANARCI -> build/scripts-2.7
changing mode of build/scripts-2.7/ANARCI from 644 to 755
running install_lib
byte-compiling /usr/local/lib/python2.7/dist-packages/anarci/anarci.py to anarci.pyc
File "/usr/local/lib/python2.7/dist-packages/anarci/anarci.py", line 123
print(">%s"%name, file=f)
^
SyntaxError: invalid syntax

running install_scripts
copying build/scripts-2.7/ANARCI -> /usr/local/bin
changing mode of /usr/local/bin/ANARCI to 755
running install_data
running install_egg_info
Removing /usr/local/lib/python2.7/dist-packages/anarci-1.3.egg-info
Writing /usr/local/lib/python2.7/dist-packages/anarci-1.3.egg-info
'module' object has no attribute 'util'(base)

~/Programme/ANARCI$ sudo python setup.py install running install running build running build_py creating build creating build/lib.linux-x86_64-2.7 creating build/lib.linux-x86_64-2.7/anarci copying lib/python/anarci/init.py -> build/lib.linux-x86_64-2.7/anarci copying lib/python/anarci/anarci.py -> build/lib.linux-x86_64-2.7/anarci copying lib/python/anarci/germlines.py -> build/lib.linux-x86_64-2.7/anarci copying lib/python/anarci/schemes.py -> build/lib.linux-x86_64-2.7/anarci running build_scripts creating build/scripts-2.7 copying and adjusting bin/ANARCI -> build/scripts-2.7 changing mode of build/scripts-2.7/ANARCI from 644 to 755 running install_lib byte-compiling /usr/local/lib/python2.7/dist-packages/anarci/anarci.py to anarci.pyc File "/usr/local/lib/python2.7/dist-packages/anarci/anarci.py", line 123 print(">%s"%name, file=f) ^ SyntaxError: invalid syntax

running install_scripts copying build/scripts-2.7/ANARCI -> /usr/local/bin changing mode of /usr/local/bin/ANARCI to 755 running install_data running install_egg_info Removing /usr/local/lib/python2.7/dist-packages/anarci-1.3.egg-info Writing /usr/local/lib/python2.7/dist-packages/anarci-1.3.egg-info 'module' object has no attribute 'util'(base)

I face a different install error, wondering if anyone knows what is the issue and any solutions?

Your issue might be related to importlib and the deprecated way it is implemented in anarci.
Maybe try running your command without sudo. If that does not help maybe try user installation: https://github.com/oxpig/ANARCI/blob/master/INSTALL

This is indeed a duplicate of #16, thanks @awesome-crab.

@chewyalvin your issue seems to be a different one, maybe best to open a separate issue for it.