How to install matplotlib in python

(*-*)浩
Release: 2019-07-09 10:24:04
Original
10005 people have browsed it

Matplotlib is a very excellent Python 2D drawing library. As long as the data conforms to the format, Matplotlib can easily create various high-quality data charts such as line charts, bar charts, and scatter charts.
How to install matplotlib in python

Installing the Matplotlib package is no different from installing other Python packages. You can also use pip to install it.

Start the command line window and enter the following command in the command line window:
(Recommended learning: Python video tutorial)

pip install matplotlib
Copy after login

The above command will The latest version of the Matplotlib package will be automatically installed. Run the above command, you can see that the program first downloads the Matplotlib package, and then prompts that the Matplotlib package is installed successfully:

Installing collected packages: matplotlib
Successfully installed matplotlib-2.2.3
Copy after login

If the command line window prompts that the pip command cannot be found, you can also pass The python command runs the pip module to install the Matplotlib package.

For example, use the following command to install the Matplotlib package:

python -m pip install matplotlib
Copy after login

After successfully installing the Matplotlib package, you can view the documentation of the Matplotlib package through pydoc. Enter the following command in the command line window:

python -m pydoc -p 8899
Copy after login

After running the above command, open the browser to view the http://localhost:8899/ page, which can be found under lib\site-packages in the Python installation directory See the documentation for the Matplotlib package as shown.

How to install matplotlib in python

For more Python related technical articles, please visit the Python Tutorial column to learn!

The above is the detailed content of How to install matplotlib in python. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template