安装Python 3.8的matplotlib时出错

2024-09-30 14:37:55 发布

您现在位置:Python中文网/ 问答频道 /正文

当尝试为新的python3.8安装matplotlib包时(例如,使用cmd中的python -m pip install matplotlib命令),我会收到如下错误消息:

ERROR: Command errored out with exit status 1:
     command: 'C:\Users\kidus\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\kidus\\AppData\\Local\\Temp\\pip-install-j92d7xqv\\matplotlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\kidus\\AppData\\Local\\Temp\\pip-install-j92d7xqv\\matplotlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\kidus\AppData\Local\Temp\pip-record-08iocxrg\install-record.txt' --single-version-externally-managed --compile
         cwd: C:\Users\kidus\AppData\Local\Temp\pip-install-j92d7xqv\matplotlib\
    Complete output (499 lines):
    ================================================================================
    Edit setup.cfg to change the build options

    BUILDING MATPLOTLIB
      matplotlib: yes [3.1.1]
          python: yes [3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC
                      v.1916 64 bit (AMD64)]]
        platform: yes [win32]

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

    OPTIONAL BACKEND EXTENSIONS
             agg: yes [installing]
           tkagg: yes [installing; run-time loading from Python Tcl/Tk]
          macosx: no  [Mac OS-X only]

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

如何删除此错误消息?可能是FreeType和{a2}包在安装时遇到困难,但在{a3}中提到需要实现,还是其他原因?在

谢谢你!在


Tags: installpiptomatplotliblocalsetuprecordusers