[Solved] Jupyter Notebook can’t find modules for python 3.6

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 it does import without any errors.



Solution #1:

Try the following:

pip3 install ipykernel --upgrade
python3 -m ipykernel install --user

Make sure that Panda is installed using pip3.

Respondent: amb1s1
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
Respondent: Doi
Solution #3:

Issue seems to be resolved by running

pip3 install rather than pip install

Respondent: Harris2018
Solution #4:

The commands:

pip3 install ipykernel --upgrade
python3 -m ipykernel install --user

worked for me only after I re-installed pip (note I was having the issue for python 3.7).

For that I did:

pip uninstall pip

then I used the (deprecated) command:

sudo easy_install pip

I also deleted any pip related thing in /usr/local/bin with the command:

rm -rf pip*

hopefully, this is helpful to someone else 🙂

Respondent: Charlie Parker
Solution #5:

Fix for Visual Studio Code

Look to the top right corner and click on the displayed Python version.

enter image description here

It should appear a list of your Python versions. Scroll down to the Python version you want to use and click on it.

enter image description here

After that you should see the Python version you selected in the top right corner.

enter image description here

Respondent: Justice Bringer
The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Most Popular

To Top
India and Pakistan’s steroid-soaked rhetoric over Kashmir will come back to haunt them both clenbuterol australia bossier man pleads guilty for leadership role in anabolic steriod distribution conspiracy