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

colab notebook ModuleNotFoundError #50

Open
Pellarin opened this issue Jul 12, 2023 · 2 comments
Open

colab notebook ModuleNotFoundError #50

Pellarin opened this issue Jul 12, 2023 · 2 comments

Comments

@Pellarin
Copy link

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
Copy link
Author

The installation part was OK.

@blacktanktop
Copy link

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.

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

2 participants