I get a NameError: name ‘IN_NOTEBOOK’ is not defined. I get this error on gradient and in DataCrunch. Is there something I’m not setting up properly, or has anyone had any similar problems?
Any help would be greatly appreciated, as I feel like I’m missing something obvious. Thankyou in advance!
/notebooks/course-v4/nbs/utils.py in
1 # Numpy and pandas by default assume a narrow screen - this fixes that
2 from fastai.vision.all import *
----> 3 from nbdev.showdoc import *
4 from ipywidgets import widgets
5 from pandas.api.types import CategoricalDtype
/opt/conda/envs/fastai/lib/python3.8/site-packages/nbdev/init.py in
5 if IN_IPYTHON:
6 from .flags import *
----> 7 from .showdoc import show_doc
8 #from .export import notebook2script
/opt/conda/envs/fastai/lib/python3.8/site-packages/nbdev/showdoc.py in
12 from nbconvert import HTMLExporter
13
—> 14 if IN_NOTEBOOK:
15 from IPython.display import Markdown,display
16 from IPython.core import page
Thank-you, that’s happened a couple of times now with DataCrunch too, and that process worked. I started the terminal and used the pip install nbdev --upgrade . Re-tried without shutting down the notebook, and it failed, but once I shutdown the notebook and restarted, it all worked. Many thanks.
@GenralIntelligenceAI
Try changing the order in which you run the terminal commands.
I guess pip install nbdev --upgrade should come second, after you ran pip install fastai fastcore --upgrade first
try this article, it worked for me. it teaches how to setup in jupyter. all u need to do by yourself is start the geadient notebook, please respond if you have any issues, i will be checking my acccount regularly. https://towardsdatascience.com/deep-learning-projects-with-fastai-from-model-training-to-deployment-2be3135bd757 if u cannot view it from the link, head to twqittwer and send this link as a amessage to yourself and open it from the twitter inbox … cheers