Issue
I'm facing weird issue in my Jupyter-notebook.
In my first cell:
import sys
!{sys.executable} -m pip install numpy
!{sys.executable} -m pip install Pillow
In the second cell:
import numpy as np
from PIL import Image
But it says : ModuleNotFoundError: No module named 'numpy'
I have used this command to install Jupyter notebook :
sudo apt install python3-notebook jupyter jupyter-core python-ipykernel
Additional information :
pip --version
pip 20.2.2 from /home/maifee/.local/lib/python3.7/site-packages/pip (python 3.7)
python --version
Python 3.7.5
Solution
Thanks to @suuuehgi. When Jupyter Notebook isn't opened as root:
import sys
!{sys.executable} -m pip install --user numpy
Answered By - Maifee Ul Asad
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.