This article mainly introduces how to install the Matplotlib module for Python in Windows. it is very detailed and has been attached to the official documentation. you should be able to perform this operation without any pressure. This is exactly the last night. It will certainly help you to describe how to install it. First, Python is installed by default, which is basically not difficult on the official website.
(1) install Setuptools
Let's start with this. all the later whl files must be installed with this tool. Basically, there are not several tutorials that will be introduced first. here we will make it all a bit more convenient for you to use.
We installed Setuptools 0.6c11. Other versions do not work, because there is an exe file directly on Pypi, which is convenient. Address: https://pypi.python.org/pypi/setuptools/0.6c11.
Download setuptools-0.6c11.win32-pyx.x.exe. Note that this should only be used for python2. Download and install the exe file. Set environment variables. Remember to add the path... \ Python27 \ Scripts to the path. Open cmd test. If yes, the installation is successful. After the whl file is installed, you can add a file name after easy_install.
(2) installation of Matplotlib
You can find the Download page on the official website or search for and Download the exe file on Sourceforge.
Address: http://sourceforge.net/projects/matplotlib/files/matplotlib /.
(3) numpy installation
Search for and download the exe file on Sourceforge. Address: http://sourceforge.net/projects/numpy/files/numpy /.
(4) install dateutil, pyparsing, scipy, and six
These are in the address: http://www.lfd.uci.edu /~ Download from gohlke/pythonlibs. Find the corresponding link based on the index and download the whl File (for example, the pyparsing character 2.0.5 character py2.py3 character none character any. whl file ).
Next, use Setuptools to install the whl file according to the method in (1). Generally, the "Finished processing dependencies for python-xxxxxx" statement indicates that the installation is successful.
Note: most of the downloaded files are like the above example, the file name also contains the version number and other information, it is best to rename here, such as the python_dateutil-2.4.2-py2.py3-none-any.whl to python_dateutil.whl, at the same time, enter easy_install pythone_dateutil in the command line in cmd to ensure that no unnecessary errors will occur.
If an error like "No module named XXX" is prompted after installing these, we will go back to address: http://www.lfd.uci.edu /~ Download gohlke/pythonlibs/and then install it.
In addition, after installing scipy, you need... \ Python27 \ Lib \ site-packages \ scipy \ six in lib. py, six. pyc, six. copy three pyo files... \ Python27 \ Lib \ site-packages directory.