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

import error in jupyter notebook; first code cell #1

Closed
bnord opened this issue Jun 7, 2017 · 4 comments
Closed

import error in jupyter notebook; first code cell #1

bnord opened this issue Jun 7, 2017 · 4 comments

Comments

@bnord
Copy link

bnord commented Jun 7, 2017

[IPKernelApp] Exception in execute request:

ImportError Traceback (most recent call last)
in ()
2
3 # import main simulation class of lenstronomy
----> 4 from lenstronomy.Extensions.SimulationAPI.simulations import Simulation
5
6 SimAPI = Simulation()

/Users/nord/Projects/lenstronomy/lenstronomy/Extensions/SimulationAPI/simulations.py in ()
----> 1 from lenstronomy.ImSim.make_image import MakeImage
2 from lenstronomy.ImSim.lens_model import LensModel
3 from lenstronomy.Solver.image_positions import ImagePosition
4 import astrofunc.util as util
5 from astrofunc.util import Util_class

/Users/nord/Projects/lenstronomy/lenstronomy/ImSim/make_image.py in ()
3 from lenstronomy.ImSim.lens_model import LensModel
4 from lenstronomy.ImSim.light_model import LensLightModel, SourceModel
----> 5 from lenstronomy.ImSim.point_source import PointSource
6
7 from lenstronomy.ImSim.data import Data

/Users/nord/Projects/lenstronomy/lenstronomy/ImSim/point_source.py in ()
1 import numpy as np
2
----> 3 import astrofunc.util as util
4
5

ImportError: No module named astrofunc.util

@bnord bnord changed the title import error in jupyter notebook; import error in jupyter notebook; first code cell Jun 7, 2017
@sibirrer
Copy link
Collaborator

sibirrer commented Jun 7, 2017

was there an error message in the installation about astrofunc? This should be a requirement in the installaton process (see requirements.txt). Otherwise try to install (also in development mode) the astrofunc package separately.

@bnord
Copy link
Author

bnord commented Jun 7, 2017

inside the requirements.txt doc:

mock
-e git://github.com/sibirrer/astrofunc.git#egg=astrofunc

@bnord
Copy link
Author

bnord commented Jun 7, 2017

git cloned astrofunc
developer installed.

fastell4py was also missing
git cloned and dev installed that.

@bnord
Copy link
Author

bnord commented Jun 7, 2017

notebook works start to finish now without error. Have not yet tried changing the options.

Thanks!

@bnord bnord closed this as completed Jun 7, 2017
sibirrer pushed a commit that referenced this issue May 31, 2019
sibirrer pushed a commit that referenced this issue Nov 4, 2019
Fix bug of NaN in lnprob
sibirrer pushed a commit that referenced this issue Jan 6, 2021
merge from original repo
sibirrer pushed a commit that referenced this issue Jan 10, 2023
Update to merger with tracer_model
sibirrer added a commit that referenced this issue Feb 16, 2023
sibirrer pushed a commit that referenced this issue Aug 16, 2023
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