In the wake of several discussions on this topic with colleagues, some online ( exhibit A, exhibit B) and some off, I decided to treat this issue in depth here.įirst, I'll provide a quick, bare-bones answer to the general question, how can I install a Python package so it works with my jupyter notebook, using pip and/or conda?. In other words, the Jupyter notebook, like all abstractions, is leaky. In the simplest contexts this issue does not arise, but when it does, debugging the problem requires knowledge of the intricacies of the operating system, the intricacies of Python package installation, and the intricacies of Jupyter itself. etc.).įundamentally the problem is usually rooted in the fact that the Jupyter kernels are disconnected from Jupyter's shell in other words, the installer points to a different Python version than is being used in the notebook. this, that, here, there, another, this one, that one, and this. This issue is a perrennial source of StackOverflow questions (e.g.
I installed package X and now I can't import it in the notebook. I most often see this manifest itself with the following issue:
To install Jupyter using pip, we need to first check if pip is updated in our system.In software, it's said that all abstractions are leaky, and this is true for the Jupyter notebook as it is for any other software. Pip uses PyPI as the default source for packages and their dependencies. These files are stored in a large “on-line repository” termed as Python Package Index (PyPI).
PIP is a package management system used to install and manage software packages/libraries written in Python.
Installing Jupyter Notebook using Anaconda:Īnaconda is an open-source software that contains Jupyter, spyder, etc that are used for large data processing, data analytics, heavy scientific computing.
To install pip, go through How to install PIP on Windows? and follow the instructions provided. Install Jupyter using the PIP package manager used to install and manage software packages/libraries written in Python. To install Anaconda, go through How to install Anaconda on windows? and follow the instructions provided. Install Python and Jupyter using the Anaconda Distribution, which includes Python, the Jupyter Notebook, and other commonly used packages for scientific computing and data science.