Open a terminal or command prompt
Run `python -m pip install matplotlib`
If needed, run `python3 -m pip install matplotlib`
If using Jupyter Notebook, run `!pip install matplotlib`
If using Anaconda, run `conda install matplotlib`
Verify installation with `python -c “import matplotlib; print(matplotlib.__version__)”`
If permissions are denied, run the install command with `–user`
If pip is outdated, run `python -m pip install –upgrade pip` before installing matplotlib
