Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
364 views
in Technique[技术] by (71.8m points)

python - jupyter notebook import error: no module named 'matplotlib'

I'm an ubuntu 16.4 user and I installed anaconda3 and using both python2 and python3 kernels.

>>>jupyter kernelspec list Available kernels: python2 /home/peterkim/.local/share/jupyter/kernels/python2 python3 /home/peterkim/anaconda3/share/jupyter/kernels/python3

and.. the problem was that I don't know where/how to install packages in order to for my python2 jupyter notebook not to make error 'no module named ...'. I tried pip install matplotlib and conda install matplotlib and I also appended '/home//anaconda2/pkgs' to the sys.path.

(I also installed anaconda2 in search of the way of using parallel kernels. After I realised that anaconda2 was not needed. but I didn't uninstall it.)

screenshot

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

When using python3 version of jupyter (pip3 install jupyter), matplotlib has to be installed using pip3: pip3 install matplotlib


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.9k users

...