Python (Win 10): Installing matplotlib requires packages “freetype” and “png”?

后端 未结 2 951
-上瘾入骨i
-上瘾入骨i 2020-12-21 09:54

I\'ve been trying to install Python\'s matplotlib library for use with PyPlot, for use with Julia. I managed to get everything in place except for this one final library, an

2条回答
  •  情话喂你
    2020-12-21 10:37

    Use a more powerful installer

    I would recommend to use Anaconda or Miniconda. In my experience with many Windows users, this is the simplest way to install packages such as matplotlib.

    Anaconda

    Anaconda comes with many packages for scientists. Matplotlib works out of the box. Just install as user not root.

    Minoconda

    If you don't want all packages of Ananconda use Miniconda

    Conda

    Both ways of installation (Anaconda or Miniconda) provide conda. It is an improved pip/virtualenv.

    You can install matplotilb with this command:

    conda install matplotlib
    

    Enviroments:

    You can create a new environment and install the packages you like:

    conda create -n my_project35 python=3.5
    activate my_project35
    conda install matplotlib
    

    or

    conda create -n my_project27 python=2.7
    activate my_project27
    conda install matplotlib
    

    Combine with pip

    You can still use pip. conda "understands" what it is doing.

提交回复
热议问题