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

Install & Import issue #2

Open
Nanco-L opened this issue Jul 22, 2020 · 2 comments
Open

Install & Import issue #2

Nanco-L opened this issue Jul 22, 2020 · 2 comments

Comments

@Nanco-L
Copy link

Nanco-L commented Jul 22, 2020

Hello, I try to install and use cormorant in my environment (Python 3.6)

First, install command suggested in the README pip install cormorant . is not working in my environment.
In addition, after installing cormorant via python setup.py install command,
import cormorant command is not working in Python following the error message below:

>>> import cormorant
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sr6/kyuhyun9.lee/env_ML/lib/python3.6/site-packages/cormorant-0.1.0-py3.6.egg/cormorant/__init__.py", line 1, in <module>
    from cormorant import cg_lib
  File "/home/sr6/kyuhyun9.lee/env_ML/lib/python3.6/site-packages/cormorant-0.1.0-py3.6.egg/cormorant/cg_lib/__init__.py", line 8, in <module>
    from cormorant.cg_lib.cg_ops_tau import cg_product_tau
  File "/home/sr6/kyuhyun9.lee/env_ML/lib/python3.6/site-packages/cormorant-0.1.0-py3.6.egg/cormorant/cg_lib/cg_ops_tau.py", line 3, in <module>
    from cormorant.so3_lib import SO3Tau
  File "/home/sr6/kyuhyun9.lee/env_ML/lib/python3.6/site-packages/cormorant-0.1.0-py3.6.egg/cormorant/so3_lib/__init__.py", line 8, in <module>
    from cormorant.so3_lib import so3_tau, so3_torch, so3_tensor
  File "/home/sr6/kyuhyun9.lee/env_ML/lib/python3.6/site-packages/cormorant-0.1.0-py3.6.egg/cormorant/so3_lib/so3_torch.py", line 2, in <module>
    import cormorant.so3_lib.rotations as rot
AttributeError: module 'cormorant' has no attribute 'so3_lib'

I manually change the line in problem

import cormorant.so3_lib.rotations as rot

like below:

from cormorant.so3_lib import rotations as rot

then import process work without any error.

What is the reason of that problem? Version of Python in my environment?
If it is correct, it will be nice to change the README!

@AllanSCosta
Copy link

AllanSCosta commented Oct 15, 2020

Hi there,

I just ran into the same issue. Thanks for sharing, your solution fixed.

@EAkeweje
Copy link

EAkeweje commented Jun 18, 2021

Thanks for sharing this. Your solution fixed installation issues. The .py files in example file worked!

However, for some strange reasons import cormorant didn't work in colab notebook. Just for anyone who would want to use this repo for their future projects on colab, I decided to share what I eventually found. Instead of using !pip install cormorant . one should use !pip install . Everything works smoothly with this.

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

3 participants