pip matplotlib模块安装错误windows 64 bit python

时间:2018-04-13 18:51:07

标签: python

' Microsoft Windows [版本10.0.14393] (c)2016 Microsoft Corporation。保留所有权利。

C:\ Users \ Rakesh> pip isntall matplotlib 错误:未知命令" isntall" - 也许你的意思是"安装"

C:\ Users \ Rakesh> pip install matplotlib 收集matplotlib   使用缓存的matplotlib-2.2.2.tar.gz     从命令python setup.py egg_info完成输出:     ================================================== ==========================     编辑setup.cfg以更改构建选项

BUILDING MATPLOTLIB
            matplotlib: yes [2.2.2]
                python: yes [3.7.0b3 (v3.7.0b3:4e7efa9c6f, Mar 29 2018,
                        18:42:04) [MSC v.1913 64 bit (AMD64)]]
              platform: yes [win32]

REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [not found. pip may install it below.]
      install_requires: yes [handled by setuptools]
                libagg: yes [pkg-config information for 'libagg' could not
                        be found. Using local copy.]
              freetype: no  [The C/C++ header for freetype
                        (freetype2\ft2build.h) could not be found.  You may
                        need to install the development package.]
                   png: no  [The C/C++ header for png (png.h) could not be
                        found.  You may need to install the development
                        package.]
                 qhull: yes [pkg-config information for 'libqhull' could not
                        be found. Using local copy.]

OPTIONAL SUBPACKAGES
           sample_data: yes [installing]
              toolkits: yes [installing]
                 tests: no  [skipping due to configuration]
        toolkits_tests: no  [skipping due to configuration]

OPTIONAL BACKEND EXTENSIONS
                macosx: no  [Mac OS-X only]
                qt5agg: no  [PySide2 not found; PyQt5 not found]
                qt4agg: no  [PySide not found; PyQt4 not found]
               gtk3agg: no  [Requires pygobject to be installed.]
             gtk3cairo: no  [Requires cairocffi or pycairo to be installed.]
                gtkagg: no  [Requires pygtk]
                 tkagg: yes [installing; run-time loading from Python Tcl /
                        Tk]
                 wxagg: no  [requires wxPython]
                   gtk: no  [Requires pygtk]
                   agg: yes [installing]
                 cairo: no  [cairocffi or pycairo not found]
             windowing: yes [installing]

OPTIONAL LATEX DEPENDENCIES
                dvipng: no
           ghostscript: no
                 latex: no
               pdftops: no

OPTIONAL PACKAGE DATA
                  dlls: no  [skipping due to configuration]

============================================================================
                        * The following required packages can not be built:
                        * freetype, png
                        * Please check http://gnuwin32.sourceforge.net/packa
                        * ges/freetype.htm for instructions to install
                        * freetype
                        * Please check http://gnuwin32.sourceforge.net/packa
                        * ges/libpng.htm for instructions to install png

----------------------------------------

命令" python setup.py egg_info" C:\ Users \ Rakesh \ AppData \ Local \ Temp \ pip-build-9bxd88gw \ matplotlib \

中的错误代码1失败

C:\ Users \ Rakesh>命令" python setup.py egg_info"失败,错误代码为1'

我尝试使用pip install matplotlib进行安装。它在收到此消息的最后下载了该模块。反正有没有直接下载和提取? 即时通讯收到此错误消息。我该怎么办?

4 个答案:

答案 0 :(得分:1)

安装Anaconda。为此,请下载 https://repo.continuum.io/archive/Anaconda3-5.1.0-Windows-x86_64.exe 并安装它。

然后,您可以使用Anaconda Navigator或使用shell中的以下命令行安装matplotlib:

conda install matplotlib

我建议你使用Anaconda(或类似的东西)。它提供预先构建的软件包,在Windows环境中非常方便,在这种环境中构建一些软件包(numpy,scipy,...)可能非常困难。

答案 1 :(得分:0)

我在Windows上使用pip安装解决任何问题的最快方法是使用这些预编译的软件包。

https://www.lfd.uci.edu/~gohlke/pythonlibs/

答案 2 :(得分:0)

matplotlib等一些软件包可以通过以下网址轻松安装:https://www.lfd.uci.edu/~gohlke/pythonlibs/ 更好的方法是从以下URL安装anaconda: https://www.anaconda.com/download/

答案 3 :(得分:0)

在Python 3.7和3.6.5及更高版本中也遇到了相同的问题...

实际上,即使我解决了上述问题,我仍然有其他问题来安装python-crfsuite和Tensorflow:

知道:

error: invalid argument '-std=c99' not allowed with 'C++/ObjC++' 

唯一对我有用的是使用 Python 3.6.4

转到here安装3.6.4,然后重试。

或者使用Conda / Anaconda here

如果您遇到在Python3.7上遇到的pkgs问题,并且有mac,请尝试使用以下方法解决它:

python location on mac osx