0

I have read several of the issues related to the same problems but didn't find a solution. I am working on Ubuntu 20.04.

I installed matplotlib in a conda environment called math.

conda install matplotlib

(conda 4.10.3)

No error, it went well it seems. But then, when I launch a jupyter notebook and tries

import matplotlib.pyplot as plt

I get

ModuleNotFoundError: No module named 'matplotlib.pyplot'

However, running

import matplotlib as plt

works without problem.

I launch the notebook from the conda math environment.

Any idea?

Thanks a lot

2 Answers 2

1
  1. Run Command Prompt as admin.
  2. Run pip install matplotlib
  3. The problem may be resolved. Moreover check if you are running the latest version of Python.
  4. If pip is not found. Reinstall Python. While reinstalling, remember to select "Add Python to path".

Hope it helps..

Sign up to request clarification or add additional context in comments.

Comments

0

Actually I solved the problem by reinstalling Jupyter noteboook.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.