HeliXonProtein / OmegaFold

OmegaFold Release Code
Apache License 2.0
547 stars 76 forks source link

Installation issue on CentOS #12

Closed olibclarke closed 2 years ago

olibclarke commented 2 years ago

Hi, I'm attempting to install this on CentOS but running into the attached error - any thoughts?

Cheers Oli

user@c112384:~/software/OmegaFold$ pip install -r requirements.txt
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 257, in run
    with self._build_session(options) as session:
  File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 69, in _build_session
    if options.cache_dir else None
  File "/usr/lib64/python2.7/posixpath.py", line 77, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'int' object has no attribute 'endswith'
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    load_entry_point('pip==8.1.2', 'console_scripts', 'pip')()
  File "/usr/lib/python2.7/site-packages/pip/__init__.py", line 220, in main
    return command.main(cmd_args)
  File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 251, in main
    timeout=min(5, options.timeout)) as session:
  File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 69, in _build_session
    if options.cache_dir else None
  File "/usr/lib64/python2.7/posixpath.py", line 77, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'int' object has no attribute 'endswith'
RuiWang1998 commented 2 years ago

Hi!

Thanks for your interest! It seems to us that you are using Python 2.7, which we do not currently support. If you would like to use OmegaFold, we suggest you use Python version higher than 3.6 at least.

Best, Rui

olibclarke commented 2 years ago

Thanks Rui - I have python 3 available on the system, but 2.75 is the default system python. Now that I realize the cause of the error, running as python3.8 -m pip install -r requirements.txt allows installation to proceed successfully. Thanks!

olibclarke commented 2 years ago

Hmmm - still not quite there. I must be doing something dumb. I install like so:

python3.8 -m pip install -r requirements.txt

Which seems successful:

user@c112384:~/software/OmegaFold$ python3.8 -m pip install --user -r requirements.txt
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Looking in links: https://download.pytorch.org/whl/cu113/torch_stable.html
Collecting biopython (from -r requirements.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/29/3b/a892a2782334544c379b89943b1d548b7b26b7bb4730561ceb942076b2a7/biopython-1.79-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (2.3MB)
     |████████████████████████████████| 2.3MB 6.9MB/s
Collecting torch==1.12.0+cu113 (from -r requirements.txt (line 3))
  Downloading https://download.pytorch.org/whl/cu113/torch-1.12.0%2Bcu113-cp38-cp38-linux_x86_64.whl (1837.6MB)
     |████████████████████████████████| 1837.6MB 125.3MB/s
Collecting numpy (from biopython->-r requirements.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/13/b1/0c22aa7ca1deda4915cdec9562f839546bb252eecf6ad596eaec0592bd35/numpy-1.23.1.tar.gz (10.7MB)
     |████████████████████████████████| 10.7MB 92.8MB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting typing-extensions (from torch==1.12.0+cu113->-r requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/ed/d6/2afc375a8d55b8be879d6b4986d4f69f01115e795e36827fd3a40166028b/typing_extensions-4.3.0-py3-none-any.whl
Building wheels for collected packages: numpy
  Building wheel for numpy (PEP 517) ... done
  Created wheel for numpy: filename=numpy-1.23.1-cp38-cp38-linux_x86_64.whl size=21726647 sha256=79d4141a2684b9f1a0402d67f2b8fed3a30832ceb92c2957634b0d8e03e7e804
  Stored in directory: /home/tmp/pip-ephem-wheel-cache-_p42vhu3/wheels/8a/40/9a/13ad61033276cc58e6371fcde7b370bb6f67deb9268d6654b4
Successfully built numpy
Installing collected packages: numpy, biopython, typing-extensions, torch
Successfully installed biopython-1.79 numpy-1.23.1 torch-1.12.0+cu113 typing-extensions-4.3.0

But then when I try to run it in the format indicated in the readme (omegafold INPUT_FILE.fasta OUTPUT_DIRECTORY), the executable is not found. Am I missing something obvious?

RuiWang1998 commented 2 years ago

Just try the old way, use python main.py INPUT_FILE.fasta OUTPUT_DIRECTORY, the omegafold INPUT_FILE.fasta OUTPUT_DIRECTORY only works if you python setup.py install first or use the pip install git+ command, sorry for the confusion, we are going to update that ASAP.

olibclarke commented 2 years ago

that does the trick, thank you, seems to be running smoothly now!