Graylab / IgFold

Fast, accurate antibody structure prediction from deep learning on massive set of natural antibodies
Other
325 stars 61 forks source link

colab notebook ModuleNotFoundError #50

Open Pellarin opened 1 year ago

Pellarin commented 1 year ago

Hi! I was just running the test case of the colab. Thanks for looking into it

---------------------------------------------------------------------------

ModuleNotFoundError                       Traceback (most recent call last)

[<ipython-input-3-2d0e067d8df6>](https://localhost:8080/#) in <cell line: 6>()
      4     sys.path.insert(0, f"/usr/local/lib/python{python_version}/site-packages/")
      5 
----> 6 from igfold.utils.visualize import *
      7 from igfold import IgFoldRunner
      8 

ModuleNotFoundError: No module named 'igfold'

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------
Pellarin commented 1 year ago

The installation part was OK.

blacktanktop commented 1 year ago

I'm in the same situation. I have found out that it seems that perhaps we are unable to install igfold in Pytjon 3.10 and igfold is installed in the Python 3.9 site-package. So it looks like I need to hard coding python-verison. (python_version = "3.9")

But even if I do it that way, I get another problem with torch So now, with the current Colab, notebook is not working properly I think.

[/usr/local/lib/python3.9/site-packages/torch/__init__.py](https://localhost:8080/#) in <module>
    214     # The __file__ check only works for Python 3.7 and above.
    215     if sys.version_info >= (3, 7) and _C_for_compiled_check.__file__ is None:
--> 216         raise ImportError(textwrap.dedent('''
    217             Failed to load PyTorch C extensions:
    218                 It appears that PyTorch has loaded the `torch/_C` folder

ImportError: Failed to load PyTorch C extensions:
    It appears that PyTorch has loaded the `torch/_C` folder
    of the PyTorch repository rather than the C extensions which
    are expected in the `torch._C` namespace. This can occur when
    using the `install` workflow. e.g.
        $ python setup.py install && python -c "import torch"

    This error can generally be solved using the `develop` workflow
        $ python setup.py develop && python -c "import torch"  # This should succeed
    or by running Python from a different directory.