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

ModuleNotFoundError: No module named 'notebooks' #28

Open
jetlee2018 opened this issue Jan 15, 2024 · 3 comments
Open

ModuleNotFoundError: No module named 'notebooks' #28

jetlee2018 opened this issue Jan 15, 2024 · 3 comments

Comments

@jetlee2018
Copy link

I am running this on windows(not in docker). I got the following error:

  ---------------------------------------------------------------------------
  ModuleNotFoundError                       Traceback (most recent call last)
  Cell In[3], line 5
        2 import matplotlib.pyplot as plt
        4 from tensorflow.keras import layers, models, optimizers, utils, datasets
  ----> 5 from notebooks.utils import display
  
  ModuleNotFoundError: No module named 'notebooks'

when it runs "from notebooks.utils import display".

I tried to run "pip install notebooks", and I got:

ERROR: Could not find a version that satisfies the requirement notebooks (from versions: none)
ERROR: No matching distribution found for notebooks

searching google doesn't help. Please help here. Thanks!

@bess-cater
Copy link

Hi, jetlee2018!
I got this issue as well, but then it striked me - if you look closely on the structure of this repository, you'll see that 'notebooks' is just a folder in here (not a python package!) and utils.py is a python file inside it. So you can just copy this folder with the file to your working directory and the problem is solved :)

@yoshisatose
Copy link

yoshisatose commented Jan 26, 2024

Or you can just add

import sys
sys.path.append('.\..\..\')

in the beginning of your notebook.

@thiagobluhm
Copy link

thiagobluhm commented Feb 7, 2024

To me it's really better using "os" package:

import os
os.chdir("yourdirectory")

Remember that "yourdirectory" must be level folder, not file.

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

4 participants