Home>Article>Backend Development> How to install matplotlib in python

How to install matplotlib in python

(*-*)浩
(*-*)浩 Original
2019-06-29 15:03:52 9901browse

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

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

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

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

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 thePython Tutorialcolumn 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!

Statement:
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
Previous article:Can python define classes? Next article:Can python define classes?