facebookresearch / esm

Evolutionary Scale Modeling (esm): Pretrained language models for proteins
MIT License
3.16k stars 627 forks source link

ModuleNotFoundError: No module named 'esm.esmfold' after running esmfold_inference.py #511

Closed JasperGeissler closed 1 year ago

JasperGeissler commented 1 year ago

NOTE: if this is not a bug report, please use the GitHub Discussions for support questions (How do I do X?), feature requests, ideas, showcasing new applications, etc.

Bug description

Calling on the script esmfold_inference.py results in an error message stating the module esm.esmfold is not available.

Reproduction steps

Command I ran:

python3 scripts/esmfold_inference.py \ -i ../avast4_portal.fasta \ -o ./

Expected behavior

A structure prediction of provided fasta sequences is provided as output in the directory specified

Logs Please paste the command line output:

23/03/27 18:13:57 | INFO | root | Reading sequences from ../avast4_portal.fasta
23/03/27 18:13:57 | INFO | root | Loaded 2 sequences from ../avast4_portal.fasta
23/03/27 18:13:57 | INFO | root | Loading model
Traceback (most recent call last):
  File "scripts/esmfold_inference.py", line 136, in <module>
    model = esm.pretrained.esmfold_v1()
  File "/scratch/jgeissler/miniconda3/envs/esmfold/lib/python3.7/site-packages/fair_esm-2.0.1-py3.7.egg/esm/pretrained.py", line 419, in esmfold_v1
ModuleNotFoundError: No module named 'esm.esmfold'

Additional context

The installation procedure I used was as follows;

Any help would be greatly appreciated!

nikitos9000 commented 1 year ago

Hi @JasperGeissler I believe the issue is in the way you installed the package. Please use pip install fair-esm[esmfold] instead as per guidance https://github.com/facebookresearch/esm#getting-started-with-this-repo-