Python is one of the most popular and in-demand programming languages around. It’s quite simple to get into for a total beginner and still is fairly powerful to pull off advanced things like AI, Machine Learning and Computer Vision.
That said, Python also has an insane amount of libraries for all sorts of different things like mathematical calculations, graphing and whatnot. In this article, we’re taking a look at troubles installing Jupyter in Python, specifically with your Python installation not being able to find distribution for ipykernel.
Use Python 3
If you’re on Linux or have multiple Python versions installed, there’s a chance that your Python installation isn’t using the right version to fetch Jupyterlab. Having multiple Python virtual environments can also trigger this issue of version mismatch.
Try specifying the Python version to force Python 3 to install the library instead of Python 2.
python3 -m pip install jupyterlab
Alternatively, you can also try
py -m pip install jupyterlab
Every time you install a package using Pip, it first checks for the latest update for itself and if there’s one, Pip will update itself first before installing any packages. This ensures that the package manager gets the latest version of the package list and runs without any issues.
However, any problems during this update process can also hinder Pip’s functionality. If it can’t update itself before installing any other package, you’ll most likely not be able to install the final package as well.
pip install --upgrade pip
Run a clean install
If nothing else works, your best bet is to uninstall Python from your PC and reinstall it again from scratch. This ensures that any wrong variables or modules that might be installed in the wrong places get removed, and everything else is done from the beginning in the correct order.