Installing Matplotlib in Python2.7

Source: Internet
Author: User

This article mainly describes the key issues encountered during the installation of the matplotlib process in Windows python2.7 Standard Edition, as well as the workaround.

Specific installation steps do not say, can be found on the Internet a lot, the main point of the installation process encountered problems in the solution.

The first recommendation is to use the Setuptools plug-in to install matplotlib-dependent packages.

Take Windows XP as an example, you can go to http://pypi.python.org/pypi/setuptools, download ez_setup.py this script, and then execute it,

After successful execution of ez_setup.py, it will automatically install Easy_install this tool, after successful execution can find the installed Easy_install under%python_home%\scripts, which contains a easy_ Install.exe; Then set the environment variable, add%python_home%\scripts to the PATH environment variable in the system environment variable), this tool is somewhat similar to Nodejs in the NPM or JS front-end Bower, you can manage the package dependency.

To download a third-party module, you can install it automatically by executing the Easy_install module name.

Here are some of the key issues that come up

    • Dateutil

If you install Dateutil through Easy_install, you can get a problem with the Dateutil URL, because Dateutil is now named PyPI in Python python_dateutil, So you need to get it right by the following means:

Easy_install Python_dateutil
    • NumPy

NumPy the most likely issue during installation is the prompt to setup script exited with Error:microsoft Visual C + + 9.0 is required (unable to find Vcvarsall.bat) . Get it from Http://aka.ms/vcpython27

Following the URL of the prompt, after downloading the MSI executable file installation, there is still a problem.

The solution to this problem can be referred to in this article, http://blog.csdn.net/huyoo/article/details/37610967

Download and configure the Mingw32 if MINGW32 is not available in distutils.cfg.

Then you can manually download the NumPy module from the Https://pypi.python.org/pypi/numpy as described in the previous article and install it as follows

#先编译源码, enter the source%numpy_source_home%--compiler=mingw32# installation:  python setup.pyinstall--compiler= Mingw32

Installing Matplotlib in Python2.7

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.