Installing Pylab/Matplotlib

前端 未结 2 821
广开言路
广开言路 2021-01-01 19:09

I\'m trying to write a program that plots a graph, which made me look into Matplotlib.

I found a tutorial that started out with this little program, that worked fin

相关标签:
2条回答
  • 2021-01-01 19:41

    If Anaconda installed and it is already in your environment path, you can get it simply using

    conda install matplotlib
    

    in command line and then call in Python with

    from pylab import *
    

    This work for me fine as "pip install" and "easy_install" both on Win and Linux caused a lot of issues

    0 讨论(0)
  • 2021-01-01 19:57

    Installing packages on *nix is easy using pip. Pip allows you to easily install packages from the Python Package Index (PyPI) with a simple pip install matplotlib. This should install all dependencies, but if it does not then you can install them manually (for instance pip install python-dateutil).

    Using pip with Windows is possible though slightly more difficult for packages that require compilers and such. However, installing Python programs on Windows is simple if you use these Windows binaries provided by Christoph Gohlke.

    The particular ones for matplotlib can be found here. Note that you can also find similar binaries for python-dateutil, six, etc if necessary.

    *As an aside: I would strongly suggest you look into using the full matplotlib.pyplot API rather than pylab. It's much more powerful and useful, but this is just some aside advice :) *

    0 讨论(0)
提交回复
热议问题