Не удалось установить pygraphviz через Visual Studio 2017 15.7.1 - PullRequest
0 голосов
/ 01 июля 2018

Вот код ошибки, который я получаю

----- Installing 'graphviz' -----
Collecting graphviz
  Downloading https://files.pythonhosted.org/packages/84/44/21a7fdd50841aaaef224b943f7d10df87e476e181bb926ccf859bcb53d48/graphviz-0.8.3-py2.py3-none-any.whl
Installing collected packages: graphviz
Successfully installed graphviz-0.8.3
----- Successfully installed 'graphviz' -----

----- Installing 'cGraph' -----
Collecting cGraph
  Downloading https://files.pythonhosted.org/packages/b8/fe/eaa8fa09ba2dd3f0d69305f84d8a21293be5ad49f6c308dac6e18ba45d80/cGraph-0.1.tar.gz
Building wheels for collected packages: cGraph
  Running setup.py bdist_wheel for cGraph: started
  Running setup.py bdist_wheel for cGraph: finished with status 'done'
  Stored in directory: C:\Users\Rintu\AppData\Local\pip\Cache\wheels\b2\b8\15\a9fe542438b4a1b19148de99b1cca1974dfa4424c22817fb54
Successfully built cGraph
Installing collected packages: cGraph
Successfully installed cGraph-0.1
----- Successfully installed 'cGraph' -----

----- Installing 'pygraphviz==1.3.1' -----
Collecting pygraphviz==1.3.1
  Using cached https://files.pythonhosted.org/packages/98/bb/a32e33f7665b921c926209305dde66fe41003a4ad934b10efb7c1211a419/pygraphviz-1.3.1.tar.gz
Building wheels for collected packages: pygraphviz
  Running setup.py bdist_wheel for pygraphviz: started
  Running setup.py bdist_wheel for pygraphviz: finished with status 'error'
  Complete output from command "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\Rintu\\AppData\\Local\\Temp\\pip-install-0lgqmg35\\pygraphviz\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\Rintu\AppData\Local\Temp\pip-wheel-9tqquc4s --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.6
  creating build\lib.win-amd64-3.6\pygraphviz
  copying pygraphviz\agraph.py -> build\lib.win-amd64-3.6\pygraphviz
  copying pygraphviz\graphviz.py -> build\lib.win-amd64-3.6\pygraphviz
  copying pygraphviz\release.py -> build\lib.win-amd64-3.6\pygraphviz
  copying pygraphviz\version.py -> build\lib.win-amd64-3.6\pygraphviz
  copying pygraphviz\__init__.py -> build\lib.win-amd64-3.6\pygraphviz
  creating build\lib.win-amd64-3.6\pygraphviz\tests
  copying pygraphviz\tests\test.py -> build\lib.win-amd64-3.6\pygraphviz\tests
  copying pygraphviz\tests\test_attributes.py -> build\lib.win-amd64-3.6\pygraphviz\tests
  copying pygraphviz\tests\test_attribute_defaults.py -> build\lib.win-amd64-3.6\pygraphviz\tests
  copying pygraphviz\tests\test_clear.py -> build\lib.win-amd64-3.6\pygraphviz\tests
  copying pygraphviz\tests\test_drawing.py -> build\lib.win-amd64-3.6\pygraphviz\tests
  copying pygraphviz\tests\test_edge_attributes.py -> build\lib.win-amd64-3.6\pygraphviz\tests
  copying pygraphviz\tests\test_graph.py -> build\lib.win-amd64-3.6\pygraphviz\tests
  copying pygraphviz\tests\test_html.py -> build\lib.win-amd64-3.6\pygraphviz\tests
  copying pygraphviz\tests\test_layout.py -> build\lib.win-amd64-3.6\pygraphviz\tests
  copying pygraphviz\tests\test_node_attributes.py -> build\lib.win-amd64-3.6\pygraphviz\tests
  copying pygraphviz\tests\test_readwrite.py -> build\lib.win-amd64-3.6\pygraphviz\tests
  copying pygraphviz\tests\test_string.py -> build\lib.win-amd64-3.6\pygraphviz\tests
  copying pygraphviz\tests\test_subgraph.py -> build\lib.win-amd64-3.6\pygraphviz\tests
  copying pygraphviz\tests\test_unicode.py -> build\lib.win-amd64-3.6\pygraphviz\tests
  copying pygraphviz\tests\__init__.py -> build\lib.win-amd64-3.6\pygraphviz\tests
  running egg_info
  writing pygraphviz.egg-info\PKG-INFO
  writing dependency_links to pygraphviz.egg-info\dependency_links.txt
  writing top-level names to pygraphviz.egg-info\top_level.txt
  reading manifest file 'pygraphviz.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no previously-included files matching '*~' found anywhere in distribution
  warning: no previously-included files matching '*.pyc' found anywhere in distribution
  warning: no previously-included files matching '.svn' found anywhere in distribution
  no previously-included directories found matching 'doc\build'
  writing manifest file 'pygraphviz.egg-info\SOURCES.txt'
  copying pygraphviz\graphviz.i -> build\lib.win-amd64-3.6\pygraphviz
  copying pygraphviz\graphviz_wrap.c -> build\lib.win-amd64-3.6\pygraphviz
  running build_ext
  building 'pygraphviz._graphviz' extension
  creating build\temp.win-amd64-3.6
  creating build\temp.win-amd64-3.6\Release
  creating build\temp.win-amd64-3.6\Release\pygraphviz
  C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-IC:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tcpygraphviz/graphviz_wrap.c /Fobuild\temp.win-amd64-3.6\Release\pygraphviz/graphviz_wrap.obj
  graphviz_wrap.c
  pygraphviz/graphviz_wrap.c(2954): fatal error C1083: Cannot open include file: 'graphviz/cgraph.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

  ----------------------------------------
Running setup.py clean for pygraphviz
  Failed building wheel for pygraphviz
Failed to build pygraphviz
Installing collected packages: pygraphviz
  Running setup.py install for pygraphviz: started
    Running setup.py install for pygraphviz: finished with status 'error'
    Complete output from command "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\Rintu\\AppData\\Local\\Temp\\pip-install-0lgqmg35\\pygraphviz\\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\Rintu\AppData\Local\Temp\pip-record-953gmdyi\install-record.txt --single-version-externally-managed --compile:
    running install
    include_dirs=None
    library_dirs=None
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.6
    creating build\lib.win-amd64-3.6\pygraphviz
    copying pygraphviz\agraph.py -> build\lib.win-amd64-3.6\pygraphviz
    copying pygraphviz\graphviz.py -> build\lib.win-amd64-3.6\pygraphviz
    copying pygraphviz\release.py -> build\lib.win-amd64-3.6\pygraphviz
    copying pygraphviz\version.py -> build\lib.win-amd64-3.6\pygraphviz
    copying pygraphviz\__init__.py -> build\lib.win-amd64-3.6\pygraphviz
    creating build\lib.win-amd64-3.6\pygraphviz\tests
    copying pygraphviz\tests\test.py -> build\lib.win-amd64-3.6\pygraphviz\tests
    copying pygraphviz\tests\test_attributes.py -> build\lib.win-amd64-3.6\pygraphviz\tests
    copying pygraphviz\tests\test_attribute_defaults.py -> build\lib.win-amd64-3.6\pygraphviz\tests
    copying pygraphviz\tests\test_clear.py -> build\lib.win-amd64-3.6\pygraphviz\tests
    copying pygraphviz\tests\test_drawing.py -> build\lib.win-amd64-3.6\pygraphviz\tests
    copying pygraphviz\tests\test_edge_attributes.py -> build\lib.win-amd64-3.6\pygraphviz\tests
    copying pygraphviz\tests\test_graph.py -> build\lib.win-amd64-3.6\pygraphviz\tests
    copying pygraphviz\tests\test_html.py -> build\lib.win-amd64-3.6\pygraphviz\tests
    copying pygraphviz\tests\test_layout.py -> build\lib.win-amd64-3.6\pygraphviz\tests
    copying pygraphviz\tests\test_node_attributes.py -> build\lib.win-amd64-3.6\pygraphviz\tests
    copying pygraphviz\tests\test_readwrite.py -> build\lib.win-amd64-3.6\pygraphviz\tests
    copying pygraphviz\tests\test_string.py -> build\lib.win-amd64-3.6\pygraphviz\tests
    copying pygraphviz\tests\test_subgraph.py -> build\lib.win-amd64-3.6\pygraphviz\tests
    copying pygraphviz\tests\test_unicode.py -> build\lib.win-amd64-3.6\pygraphviz\tests
    copying pygraphviz\tests\__init__.py -> build\lib.win-amd64-3.6\pygraphviz\tests
    running egg_info
    writing pygraphviz.egg-info\PKG-INFO
    writing dependency_links to pygraphviz.egg-info\dependency_links.txt
    writing top-level names to pygraphviz.egg-info\top_level.txt
    reading manifest file 'pygraphviz.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files matching '*~' found anywhere in distribution
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '.svn' found anywhere in distribution
    no previously-included directories found matching 'doc\build'
    writing manifest file 'pygraphviz.egg-info\SOURCES.txt'
    copying pygraphviz\graphviz.i -> build\lib.win-amd64-3.6\pygraphviz
    copying pygraphviz\graphviz_wrap.c -> build\lib.win-amd64-3.6\pygraphviz
    running build_ext
    building 'pygraphviz._graphviz' extension
    creating build\temp.win-amd64-3.6
    creating build\temp.win-amd64-3.6\Release
    creating build\temp.win-amd64-3.6\Release\pygraphviz
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -INone "-IC:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tcpygraphviz/graphviz_wrap.c /Fobuild\temp.win-amd64-3.6\Release\pygraphviz/graphviz_wrap.obj
    graphviz_wrap.c
    pygraphviz/graphviz_wrap.c(2954): fatal error C1083: Cannot open include file: 'graphviz/cgraph.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

    ----------------------------------------
Command ""C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\Rintu\\AppData\\Local\\Temp\\pip-install-0lgqmg35\\pygraphviz\\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\Rintu\AppData\Local\Temp\pip-record-953gmdyi\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Rintu\AppData\Local\Temp\pip-install-0lgqmg35\pygraphviz\
----- Failed to install 'pygraphviz==1.3.1' -----

Я не понимаю, где я иду не так. Я пытаюсь установить этот конкретный пакет под названием pygraphviz для среды Python Anaconda3 через visual studio. Я даже корректно обновил pip через visual studio и также установил graphviz и cgraph.

Так есть идеи, почему это не устанавливается? Я не могу понять все коды выше.

1 Ответ

0 голосов
/ 27 июля 2018

Также столкнулся с этой проблемой только сейчас, нашел в другом вопросе ответ

Подведем итог здесь:

Из документации PyGraphviz - Чтобы использовать PyGraphviz вам нужен Python версии 2.6.x или 2.7.x.

PyGraphviz не работает с Python 3

ссылка на дополнительную информацию.

Поскольку вы используете Anaconda3, вы используете Python 3.

В комментариях к ответу также есть обходной путь, но я еще не попробовал его.

...