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

circular import issue #113

Closed
hvasbath opened this issue Nov 21, 2023 · 11 comments · Fixed by #115
Closed

circular import issue #113

hvasbath opened this issue Nov 21, 2023 · 11 comments · Fixed by #115

Comments

@hvasbath
Copy link
Member

meysam on pyrocko support, installation channel

Hi, I wanted to update the Pyrocko and Kite, and I am facing this error. I wonder if anyone knows the reason for that? 
Traceback (most recent call last):
  File "/home/geodesy/anaconda3/envs/TEST_kite/bin/spool", line 5, in <module>
    from kite.spool.main import main
  File "/home/geodesy/anaconda3/envs/TEST_kite/lib/python3.9/site-packages/kite/init.py", line 4, in <module>
    from .covariance import Covariance  # noqa
  File "/home/geodesy/anaconda3/envs/TEST_kite/lib/python3.9/site-packages/kite/covariance.py", line 18, in <module>
    from kite import covariance_ext
ImportError: cannot import name 'covariance_ext' from partially initialized module 'kite' (most likely due to a circular import) (/home/geodesy/anaconda3/envs/TEST_kite/lib/python3.9/site-packages/kite/init.py)
@hvasbath
Copy link
Member Author

hvasbath commented Nov 21, 2023

Might be related:
#111

@Uncleyyyyy
Copy link

So if there is any solution now?

@emolch
Copy link
Member

emolch commented Nov 30, 2023

Have run into this several times with different setups. How exactly did you install kite? From source or using the pip package? Are you using the latest version? The latest commits on master try to resolve this issue.

@hvasbath
Copy link
Member Author

hvasbath commented Dec 1, 2023

I just did a fresh install ubuntu 20.04, python11 venv environment with the pip-meaning this does not include the latest installation patch and I have no issues.
@Uncleyyyyy do you also have the issue? What are your system specs?

@hvasbath
Copy link
Member Author

hvasbath commented Dec 1, 2023

I confirm I can reproduce the issue when installing from source through pip on latest master. So it seems the latest patch caused the issue.

@Suansuan0922
Copy link

I have the same error, is there any solution?

@hvasbath
Copy link
Member Author

hvasbath commented Dec 4, 2023

Hello @Suansuan0922 can you please provide your installation details?! Meysam (initial issue reporter) was meanwhile able to install it falling back to the latest released version (pip install kite) instead of the latest version on master (pip install . (in the source directory)).

@hvasbath
Copy link
Member Author

hvasbath commented Dec 4, 2023

The install instructions on the website need updating. They suggest to install from source. But the standard way should be to install latest stable release, i.e. with:

pip install kite

@Uncleyyyyy
Copy link

I just did a fresh install ubuntu 20.04, python11 venv environment with the pip-meaning this does not include the latest installation patch and I have no issues. @Uncleyyyyy do you also have the issue? What are your system specs?

Sorry to bother! I just tried to uninstall the environment and reinstall every module. And it works fine now! I think maybe there are some conflicts existing between the modules? However, there is no error now.

@emolch
Copy link
Member

emolch commented Dec 5, 2023

I added some compatibility fixes in the branch bugfix/compatibility, please check if this solves the issues.

@auld-L
Copy link

auld-L commented Dec 14, 2023

I install kite with anaconda,i can't find the setup.py ,what should i do?

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

Successfully merging a pull request may close this issue.

5 participants