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

Grizli Modules Not Found #84

Open
Bren314 opened this issue Jun 6, 2022 · 4 comments
Open

Grizli Modules Not Found #84

Bren314 opened this issue Jun 6, 2022 · 4 comments

Comments

@Bren314
Copy link

Bren314 commented Jun 6, 2022

When running the second cell of Grizli-Pipeline.ipynb I get the errror AttributeError: module 'grizli' has no attribute 'version'

I also notice when running this cell that it is using the lines ! git clone https://github.com/gbrammer/grizli.git and
! pip install grizli/ -r grizli/requirements.txt rather than the import grizli.
Due to this I can also see it return things it had in my terminal when I was installing grizli such as lines as: Requirement already satisfied: numpy in /opt/anaconda3/envs/grizli-dev/lib/python3.7/site-packages (from grizli==1.4.0) (1.21.5)

I fallowed the installation instructions on https://grizli.readthedocs.io/en/latest/grizli/install.html#installation-with-conda-and-environment-yml. When I ran the pytest on grizli it returns:

===========short test summary info =====================
FAILED grizli/tests/test_autoscript.py::UtilsTester::test_parse_wfc3_visits
FAILED grizli/tests/test_fits.py::FittingTools::test_config - FileNotFoundErr...
FAILED grizli/tests/test_fits.py::FittingTools::test_multibeam - FileNotFound...
FAILED grizli/tests/test_fits.py::FittingTools::test_redshift_fit - FileNotFo...
===========4 failed, 12 passed in 31.97s =================

Not sure where to go from here, so any tip can help a lot.

@gbrammer
Copy link
Owner

gbrammer commented Jun 6, 2022

Thanks, @Bren314 . Can you try compiling with the -e flag, i.e., pip install -e . -r requirements.txt from within the grizli repository directory? That should compile the c extensions in the correct place and also populate version.py. Running from up a directory like you had may also work, I've just never run it that way.

@Bren314
Copy link
Author

Bren314 commented Jun 22, 2022

Hey Gabe, that did not work. I'm not too sure where to start. My terminal told me I successfully installed grizli, but when I go into python to start testing it. It allows me to import grizli but the version is an empty string and it won't import any modules that I know are installed (see error below):

Successfully installed grizli-1.4.0
(grizli-dev) grizli Users $ python
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 26 2018, 23:26:24)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import grizli
grizli.version
''
import numpy
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'numpy'

I noticed a previous post about "Numpy module not found when installing with requirements.txt #59" and trying to solve it by first pip installing numpy and then re-running the command, I pip uninstalled and reinstalled it still didn't work.

@Bren314
Copy link
Author

Bren314 commented Jun 23, 2022

Hey it is working now not sure why

@gbrammer
Copy link
Owner

I suspect that you were trying to import grizli from within the repository directory, which will have problems.

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