Need help with Jupyter Notebook

That above indicates you are using Anaconda/conda as your main package manager. Because Anaconda/conda as your main package manager, you should primarily be using conda to install packages and only fall back to pip when absolutely necessary. So I don’t know if your class is giving you bad advice or you did something different than it suggested; however, I believe most of those packages install with conda and so that is what you should be using. Additionally, it has more power to act in your system and more complex installs often work with conda whereas they fail with pip.

So for the example on the first line if you search ‘anaconda pandas’ you’ll end up here and so one option for the proper command to run inside the notebook is %conda install -c anaconda pandas. However, don’t quite go running that yet. There is also the conda-forge channel and if you search ‘pandas conda-forge’ you’ll see the command is %conda install -c conda-forge pandas. You should probably read the highlight here, look for the other packages you need to see if they are also available on conda-forge as well, and decide which one is more in line with your class.

You may notice I’m using the current best practice of using a magic command. See here about the modern magic install commands that you can run inside notebooks so the installs occur in the environments where the kernel is running that is underlying the active notebook. If you course isn’t using that take some aspects with a critical eye. See the second paragraph here on why to avoid use of exclamation point with pip and conda installs. This is also why elsewhere here I question how current is what you are saying is being suggested.

Is there text that accompanies the video available? Consider videos get outdated very fast whereas text based versions that accompany videos can be updated much more easily and so maybe they updated that?


How recently did you install Anaconda/conda? If you are using something old on your system I recommend updating. We cannot see what triggered the issue you are pasting about because you haven’t pasted the part of the traceback that gives that information. For example, does the first line of your long list of commands cause that or the 6th line. The way you are doing things and posting here isn’t providing that information. And it isn’t a good way to troubleshoot. Break the problem down to see what works and what fails as you troubleshoot.

An important aspect to consider is the versions. I see you are having issues with matplotlib. I would suggest making a separate environment and trying installing the packages without specifying the versions and see how that goes.


Also you have tagged this with the ‘JupyterHub’ category. Is that accurate? The title and the post and lines you share suggest it isn’t; you appear not to be a JupyterHub.