Windows Python Drawing Library Matplotlib installation Method (pro-Test) __python

Source: Internet
Author: User
Tags install matplotlib

This matplotlib installation process to a certain extent, the reference

http://blog.csdn.net/qrlhl/article/details/48978107

Because the need to learn machine learning, but also ready to refer to the "machine learning Combat" This book to get started. After installing python3.4 and the scientific calculation package numpy, you need to use the drawing package matplotlib.

The installation of the goods has really wasted my effort. After reading a variety of tutorials, I struggled with the WHL file to install in DOS or directly download an executable EXE file without brain installation.

Originally I used the latest 3.5 version of Python, the picture is fresh, but expensive ah, there are few available libraries, but do not want to use the old hot 2.7 version, so a comprehensive consideration, download the 14 release of the 3.4 version. It is recommended that Python new "players" Install Python do not customize the installation path, can not occupy the use of the default path installed in the C disk is good, can not occupy much space. preparatory work

★\BIGSTARMATPLOTILB installation requires a number of dependencies, such as the previous calculation package NumPy, no brain installation can refer to my previous blog

http://blog.csdn.net/scut_arucee/article/details/50016521

★\bigstar system environment variable don't forget to set, right key my Computer → attribute → advanced system settings → environment variable, find path in the following system variable, add C:\Python34\ and C:\Python34\Scripts to its value

Note that each of the two values is separated by semicolons, and if you add at the end, the last one is worth not being silly plus a semicolon; If you add to the front, the first one is worth not having a semicolon before.

Now, assuming you've installed Python and numpy packages, here's how to install matplotlib without a brain:

* * Specific process

**

First to download the matplotlib EXE file

https://pypi.python.org/pypi/matplotlib/1.4.3

http://sourceforge.net/projects/matplotlib/files/matplotlib/

I use the first link here, select the version you need to download, since it is no brain, choose the following EXE files, do not select those WHL files

If you have installed the corresponding version of Python, it will search your directory for the corresponding version of Python, as follows

All you have to do now is to have no brain to go next until it is "loaded."

Is it really ready? Open Python and try, enter import matplotlib on the command line, and the following error occurs

Must be missing the module, what can be done, then download the six module

Https://pypi.python.org/pypi/six

Select the brain-free compressed file download, as follows

Decompression get six-1.10.0 folder, renamed to six, copy to C:\Python34\Lib\site-packages path, then go to Python to knock import matplotlib

The module object appears without the version that attribute

Workaround:

To the C:\Python34\Lib\site-packages\six path, copy the six.py file to the C:\Python34\Lib\site-packages path.

And then into Python to knock import matplotlib, missing since the module dateutil

Download the WHL version of Dateutil (note that WHL)

https://pypi.python.org/pypi/python-dateutil/2.4.2

If there is no brain to download the compression package, then the import matplotlib will appear in the late, but import Matplotlib.pyplot as plt will be wrong. So download WHL here, download and put in any directory, such as I put in the C:\Users\aricee path, and then into the CMD, use the CD into your WHL file directory, and then input pip install Python_ DATEUTIL-2.4.2-PY2.PY3-NONE-ANY.WHL can be installed automatically.

And then into Python. Import matplotlib, missing dependency module pyparsing

Less on the next chant, still download the non-brain exe

Https://pypi.python.org/pypi/pyparsing/2.0.3#downloads

Finally, it's done, go to the Python window and import import matplotlib and import Matplotlib.pyplot as PLT.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.