-1

I have installed matplotlib but the console doesn't recognise it as a command.

In case it helps, the same happend with jupyter notebook and I ended up havig to access it through the command python -m notebook. Can someone help please?

1
  • 3
    matplotlib isn't a command you run from the Command Prompt. It's a module you import into python with import matplotlib as plt Commented Sep 18, 2023 at 20:53

1 Answer 1

-1

"matplotlib" is not an executable command. It is a python library thus can only be used in a python interpreter, not in the Command Prompt or any other Shell for that matter.

The command you mentioned:

python -m notebook 

works because "python" is an executable command. I suggest you brush up on Shell Commands and Scripting to gain some more understanding on this matter.

To use the matplotlib Library in the console. Do so, Please note that this will just open the Python Interpreter in the console and the matplotlib command won't be an executable command here either.

python 

Once in the Python console:

import matplotlib 

Here you can access the python libraries you have installed by importing them as above.

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.