I am brand new to coding. I am doing the Python course and have come to the Reggie’s Linear Regression project. I have followed all the instructions and have installed Miniconda on my laptop and all the add-ins including jupyter notebook. I downloaded the zip file for the project.
I navigate to the downloads folder and into the Reggies-Linear-Regression folder in Anaconda Prompt - I even check in the Windows explorer folder that the jupyter notebooks are there. Then when I type “jupyter notebook” in the Anaconda Prompt it opens a Jupyter Notebook in Chrome but it says “This notebook is empty”.
I don’t know what to do… please help
Is there a
file option at the top of your notebook, you’d want to navigate to the existing
.ipynb file (the skeleton one, not the solutions ) and open it. The notebook won’t necessarily automatically open the correct file.
You can run a command like the following where you replace the “path/to” bit with a real or relative path on your own machine to the file:
jupyter notebook /path/to/Reggie_Linear_Regression_Skeleton.ipynb if you’d rather start with that file open.
The tab in Chrome opens the jupyter notebook on the “Files” tab - there are NO .ipynb file in the Files tab - it says: This notebook is empty
I don’t know exactly how you’re starting your session but it seems to be opening in a rather odd location (an empty one). The typical “root directory” for the notebook is the folder from which you start it.
Starting it up in a sensible place would be the easiest option.
If you were to navigate to a folder and the invoke the notebook I think you’ll have an easier time, e.g.
cd ~/myprojects/python/cc/reggie jupyter notebook
If not you can start in a base directory and work with the GUI from there, e.g.
cd ~; jupyter notebook (this would show all files/folders under your username so you can just click through the folders to find what you want).
You can also pass a directory path to the notebook to make it start from there too, e.g.
jupyter notebook ~/myprojects/python/cc/reggie.
Thanks for taking so much time to help me. I did follow the instructions as per the project.
This is a screnshot of my Anaconda Prompt - so you can see I was in the correct directory.
The shot below is of the Windows File Explorer to show where the files are. Does the fact that they have the . at the front of their label make a difference?
When you unzipped the original Reggie’s .zip file you downloaded from cc, the main folder should contain the following files-
Reggie_Linear_Regression_Skeleton.ipynb Reggie_Linear_Regression_Solution.ipynb __MACOSX/
It looks like you’re in the __MACOSX/ folder or you’ve somehow copied only that folder. Navigate back to the .zip and try unpacking the contents again, you can completely delete the __MACOSX folder in the unpacked files, it serves no purpose. What you want is those two
.ipynb files, no dots or otherwise (size is probably several KB if not hundreds).
For a little more info:
The convention for unix systems is to to start paths with a
. when they’re supposed to be hidden (a lot of configuration files/ settings will use this). The files you have are, or were, a part of the indexing system for apple’s OSX. They’re utterly useless to you or to anyone else though and should not have been zipped in the first place.
The files you have in your project folder in that screenshot aren’t real notebook files, they’re probably some kind of indexing tool. Make sure you get the actual notebooks (they won’t start with
. and they’ll be a more sensible size).
Yay! I have got it open at last.
Thank you for your immense patience and helping me.
Your explanations are brilliant
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.