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

ImportError #89

Open
Moin-Mohamed opened this issue Apr 18, 2023 · 2 comments
Open

ImportError #89

Moin-Mohamed opened this issue Apr 18, 2023 · 2 comments

Comments

@Moin-Mohamed
Copy link

The nosetests all run fine, however when i run redmapper_run.py i continuously get ImportErrors. The first being:
Traceback (most recent call last):
File "redmapper_run.py", line 22, in
from .utilities import _pickle_method
ImportError: attempted relative import with no known parent package

At first I just changed the code to make it absolute, i.e changed the line to "from utilities import _pickle_method". However, this means i have to change almost every script dependencies. Then I end up getting this:

ImportError: cannot import name '_solver_nfw_pywrap' from partially initialized module 'solver_nfw' (most likely due to a circular import) (/home/moinm/redmapper/redmapper/solver_nfw/init.py)

I messed around once again but the ImportErrors goes on forever. I have all dependencies installed but maybe I'm missing something that isnt listed in the requirements? Or maybe my dependency versions are not compatible (if yes, what version do i downgrade to?) I'm not sure what to do at this point. Any suggestion will be appreciated.

@erykoff
Copy link
Owner

erykoff commented Apr 19, 2023

How are you running this? Did you do python setup.py install or pip install .? And when you run it you need to make sure you are not in the redmapper directory or python will get confused about the files in the local directory and the installed version.

You can also install redmapper from conda-forge, or (new!) a Docker container here: https://github.com/erykoff/redmapper/pkgs/container/redmapper

@Moin-Mohamed
Copy link
Author

Moin-Mohamed commented Apr 27, 2023 via email

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