Jupyter Notebook can't find modules for python 3.6
Solution 1
Try the following:
pip3 install ipykernel --upgrade
python3 -m ipykernel install --user
Make sure that Panda is installed using pip3.
Solution 2
I was having a similar issue. I installed a text processing tool using pip3. The installation was successful and I was able to run the test-code from the terminal, however I was unable to execute the same code from jupyter notebook
. Checked that the sys.version
was 3.7.1
in notebook but the terminal version was 3.6.9
.
The problem was resolved after executing the following commands and relaunching the notebook:
pip3 install ipykernel --upgrade
python3 -m ipykernel install --user
Solution 3
Issue seems to be resolved by running
pip3 install
rather than pip install
Solution 4
Fix for Visual Studio Code
Look to the top right corner and click on the displayed Python version.
It should appear a list of your Python versions. Scroll down to the Python version you want to use and click on it.
After that you should see the Python version you selected in the top right corner.
Related videos on Youtube

Harris2018
Updated on February 09, 2022Comments
-
Harris2018 over 1 year
Not sure what happened but whenever I use ipython, hydrogen (atom) or jupyter notebook can't find any of the installed modules. I know I have pandas installed but the notebook says its not found.
I should add that when I run the script normally (
python script.py
) it does import without any errors.Suggestions?
Thanks!
-
amb1s1 almost 5 yearsRun
python --version
and show us the output. What I'm thinking is that you have two versions of python running on your machine. The terminal is running one and atom is running the other version.
-
-
Harris2018 almost 5 yearsran those commands but the issue still ocurrs in atom via hydrogen. when I ran
import pandas
it threw the module not found error but when I importy numpy it did not throw me any error. -
amb1s1 almost 5 yearsRun
pip3 list
to show the list of install packages and see if panda is on that list. -
Harris2018 almost 5 yearsusing
pip3 install
seems to have done the trick. Its strange because when i usedpip install
andconda install
it says the package was already there. Is this something I need to fix or be worried about? -
amb1s1 almost 5 years
pip install
install python 2.x packages and pip3 install python 3.x. -
Rexcirus over 3 yearspip3 install jupyter
-
Charlie Parker over 3 yearsI tried doing that but then it complains I need to upgrade but when I try to upgrade says it's already upgraded but pip3 doesnt think so...chickecn and egg problem? ` (automl) brandomiranda~ ❯ pip3 install ERROR: You must give at least one requirement to install (see "pip help install") You are using pip version 10.0.1, however version 19.3.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. (automl) brandomiranda~ ❯ pip install --upgrade pip Requirement already up-to-date: pip in ./miniconda3/envs/automl/lib/python3.7/site-packages (19.3.1) `
-
Charlie Parker over 3 yearsit didn't install anything. Why? Error:
Requirement not upgraded as not directly required: tornado>=4.2 in /usr/local/lib/python3.6/site-packages (from ipykernel) (6.0.3) Requirement not upgraded as not directly required: jupyter-client in /usr/local/lib/python3.6/site-packages (from ipykernel) (5.3.4)
there are more errors but they don't fit in a comment. -
Punnerud over 2 yearsIf you don't have pip3, try "python3 -m pip install ipykernel --upgrade"
-
Michael Gruner over 2 yearsWoked for me, thanks. Care to explain what happened and why does this work?
-
odbhut.shei.chhele almost 2 yearsWorked like a charm
-
Faheeem Sajjad over 1 yearfor some 'python3 -m ipykernel install --user' might not work. Instead use, 'py -3 -m ipykernel install --user' on cmd-windows
-
Faheeem Sajjad over 1 yearfor some 'python3 -m ipykernel install --user' might not work. Instead use, 'py -3 -m ipykernel install --user' on cmd-windows