【问题标题】:Tried using pip to install visualization [duplicate]尝试使用 pip 安装可视化 [重复]
【发布时间】:2020-11-22 18:01:49
【问题描述】:

所以,我尝试使用 pip install visualization 在 python 中安装 visualization 模块 (https://pypi.org/project/visualization/),我从中获得此输出 -

Collecting visualization
Using cached visualization-0.1.4-py3-none-any.whl (13 kB)
Requirement already satisfied: numpy in c:\users\sohan\appdata\local\programs\python\python37\lib\site-packages (from visualization) (1.19.0)
Collecting autolab-perception
  Using cached autolab_perception-0.0.8-py3-none-any.whl (82 kB)
Collecting autolab-core
  Using cached autolab_core-0.0.14-py3-none-any.whl (73 kB)
Collecting trimesh[easy]
  Using cached trimesh-3.7.14-py3-none-any.whl (619 kB)
Collecting imageio
  Using cached imageio-2.9.0-py3-none-any.whl (3.3 MB)
Collecting pyrender
  Using cached pyrender-0.1.43-py3-none-any.whl (1.2 MB)
Collecting matplotlib<=2.2.0
  Using cached matplotlib-2.2.0.tar.gz (37.2 MB)

还有这个错误-

ERROR: Command errored out with exit status 1:
     command: 'c:\users\sohan\appdata\local\programs\python\python37\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sohan\\AppData\\Local\\Temp\\pip-install-dhk3_0ty\\matplotlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\sohan\\AppData\\Local\\Temp\\pip-install-dhk3_0ty\\matplotlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\sohan\AppData\Local\Temp\pip-pip-egg-info-qk4saili'
         cwd: C:\Users\sohan\AppData\Local\Temp\pip-install-dhk3_0ty\matplotlib\
    Complete output (61 lines):
    ============================================================================
    Edit setup.cfg to change the build options

    BUILDING MATPLOTLIB
                matplotlib: yes [2.2.0]
                    python: yes [3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019,
                            00:42:30) [MSC v.1916 64 bit (AMD64)]]
                  platform: yes [win32]

    REQUIRED DEPENDENCIES AND EXTENSIONS
                     numpy: yes [version 1.19.0]
          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
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

我也尝试过使用pip3,但没有成功。我正在使用 Windows。

【问题讨论】:

  • 它在 GitHub 上有代码,上面有 issues 的位置 - 所以将问题发送给作者。

标签: python python-3.x pip


【解决方案1】:

使用 python 3.6 或者你可以从源代码构建它

根据您的错误判断,您可能正在使用不同的版本,并且 pip 正在尝试从源代码构建它。该错误是因为您没有安装 Visual Studio 构建工具。安装它,它将解决您的错误 get it from here

【讨论】:

    猜你喜欢
    • 2014-08-01
    • 1970-01-01
    • 1970-01-01
    • 2021-03-16
    • 1970-01-01
    • 2019-11-25
    • 1970-01-01
    • 2021-06-06
    • 2018-09-30
    相关资源
    最近更新 更多