Closed Kochise closed 1 year ago
Installing from pip
I get this :
- - - Installing "emerge-viz" - - - - - - - - - - - - - - - - - - - - - - - -
Collecting emerge-viz
Downloading emerge_viz-1.5.0-py3-none-any.whl (1.1 MB)
---------------------------------------- 1.1/1.1 MB 1.6 MB/s eta 0:00:00
Collecting autopep8 (from emerge-viz)
Downloading autopep8-2.0.2-py2.py3-none-any.whl (45 kB)
---------------------------------------- 45.2/45.2 kB 1.1 MB/s eta 0:00:00
Collecting interrogate (from emerge-viz)
Downloading interrogate-1.5.0-py3-none-any.whl (45 kB)
---------------------------------------- 45.3/45.3 kB ? eta 0:00:00
Collecting networkx (from emerge-viz)
Downloading networkx-3.1-py3-none-any.whl (2.1 MB)
---------------------------------------- 2.1/2.1 MB 2.6 MB/s eta 0:00:00
Collecting scikit-learn (from emerge-viz)
Downloading scikit_learn-1.2.2-cp310-cp310-win_amd64.whl (8.3 MB)
---------------------------------------- 8.3/8.3 MB 2.9 MB/s eta 0:00:00
Collecting prettytable (from emerge-viz)
Downloading prettytable-3.7.0-py3-none-any.whl (27 kB)
Collecting py (from emerge-viz)
Downloading py-1.11.0-py2.py3-none-any.whl (98 kB)
---------------------------------------- 98.7/98.7 kB ? eta 0:00:00
Collecting pygraphviz (from emerge-viz)
Downloading pygraphviz-1.10.zip (120 kB)
-------------------------------------- 120.6/120.6 kB 3.6 MB/s eta 0:00:00
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting pylint (from emerge-viz)
Downloading pylint-2.17.4-py3-none-any.whl (536 kB)
-------------------------------------- 536.6/536.6 kB 2.8 MB/s eta 0:00:00
Collecting pyparsing (from emerge-viz)
Downloading pyparsing-3.0.9-py3-none-any.whl (98 kB)
---------------------------------------- 98.3/98.3 kB 5.5 MB/s eta 0:00:00
Collecting python-louvain (from emerge-viz)
Downloading python-louvain-0.16.tar.gz (204 kB)
-------------------------------------- 204.6/204.6 kB 4.2 MB/s eta 0:00:00
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting tabulate (from emerge-viz)
Downloading tabulate-0.9.0-py3-none-any.whl (35 kB)
Collecting astroid<=2.17.0-dev0,>=2.15.4 (from pylint->emerge-viz)
Downloading astroid-2.15.4-py3-none-any.whl (278 kB)
-------------------------------------- 278.1/278.1 kB 2.9 MB/s eta 0:00:00
Collecting tomlkit>=0.10.1 (from pylint->emerge-viz)
Downloading tomlkit-0.11.8-py3-none-any.whl (35 kB)
Collecting dill>=0.2 (from pylint->emerge-viz)
Downloading dill-0.3.6-py3-none-any.whl (110 kB)
-------------------------------------- 110.5/110.5 kB 2.1 MB/s eta 0:00:00
Collecting scipy>=1.3.2 (from scikit-learn->emerge-viz)
Downloading scipy-1.10.1-cp310-cp310-win_amd64.whl (42.5 MB)
---------------------------------------- 42.5/42.5 MB 1.9 MB/s eta 0:00:00
Collecting joblib>=1.1.1 (from scikit-learn->emerge-viz)
Downloading joblib-1.2.0-py3-none-any.whl (297 kB)
-------------------------------------- 298.0/298.0 kB 2.3 MB/s eta 0:00:00
Collecting threadpoolctl>=2.0.0 (from scikit-learn->emerge-viz)
Downloading threadpoolctl-3.1.0-py3-none-any.whl (14 kB)
Collecting lazy-object-proxy>=1.4.0 (from astroid<=2.17.0-dev0,>=2.15.4->pylint->emerge-viz)
Downloading lazy_object_proxy-1.9.0-cp310-cp310-win_amd64.whl (22 kB)
Collecting wrapt<2,>=1.11 (from astroid<=2.17.0-dev0,>=2.15.4->pylint->emerge-viz)
Downloading wrapt-1.15.0-cp310-cp310-win_amd64.whl (36 kB)
Building wheels for collected packages: pygraphviz, python-louvain
Building wheel for pygraphviz (setup.py): started
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
¦ exit code: 1
?-> [52 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\pygraphviz
copying pygraphviz\agraph.py -> build\lib.win-amd64-cpython-310\pygraphviz
copying pygraphviz\graphviz.py -> build\lib.win-amd64-cpython-310\pygraphviz
copying pygraphviz\scraper.py -> build\lib.win-amd64-cpython-310\pygraphviz
copying pygraphviz\testing.py -> build\lib.win-amd64-cpython-310\pygraphviz
copying pygraphviz\__init__.py -> build\lib.win-amd64-cpython-310\pygraphviz
creating build\lib.win-amd64-cpython-310\pygraphviz\tests
copying pygraphviz\tests\test_attribute_defaults.py -> build\lib.win-amd64-cpython-310\pygraphviz\tests
copying pygraphviz\tests\test_clear.py -> build\lib.win-amd64-cpython-310\pygraphviz\tests
copying pygraphviz\tests\test_close.py -> build\lib.win-amd64-cpython-310\pygraphviz\tests
copying pygraphviz\tests\test_drawing.py -> build\lib.win-amd64-cpython-310\pygraphviz\tests
copying pygraphviz\tests\test_edge_attributes.py -> build\lib.win-amd64-cpython-310\pygraphviz\tests
copying pygraphviz\tests\test_graph.py -> build\lib.win-amd64-cpython-310\pygraphviz\tests
copying pygraphviz\tests\test_html.py -> build\lib.win-amd64-cpython-310\pygraphviz\tests
copying pygraphviz\tests\test_layout.py -> build\lib.win-amd64-cpython-310\pygraphviz\tests
copying pygraphviz\tests\test_node_attributes.py -> build\lib.win-amd64-cpython-310\pygraphviz\tests
copying pygraphviz\tests\test_readwrite.py -> build\lib.win-amd64-cpython-310\pygraphviz\tests
copying pygraphviz\tests\test_repr_mimebundle.py -> build\lib.win-amd64-cpython-310\pygraphviz\tests
copying pygraphviz\tests\test_scraper.py -> build\lib.win-amd64-cpython-310\pygraphviz\tests
copying pygraphviz\tests\test_string.py -> build\lib.win-amd64-cpython-310\pygraphviz\tests
copying pygraphviz\tests\test_subgraph.py -> build\lib.win-amd64-cpython-310\pygraphviz\tests
copying pygraphviz\tests\test_unicode.py -> build\lib.win-amd64-cpython-310\pygraphviz\tests
copying pygraphviz\tests\__init__.py -> build\lib.win-amd64-cpython-310\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 files found matching '*.png' under directory 'doc'
warning: no files found matching '*.txt' under directory 'doc'
warning: no files found matching '*.css' under directory 'doc'
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'
adding license file 'LICENSE'
writing manifest file 'pygraphviz.egg-info\SOURCES.txt'
copying pygraphviz\graphviz.i -> build\lib.win-amd64-cpython-310\pygraphviz
copying pygraphviz\graphviz_wrap.c -> build\lib.win-amd64-cpython-310\pygraphviz
running build_ext
building 'pygraphviz._graphviz' extension
creating build\temp.win-amd64-cpython-310
creating build\temp.win-amd64-cpython-310\Release
creating build\temp.win-amd64-cpython-310\Release\pygraphviz
cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DSWIG_PYTHON_STRICT_BYTE_CHAR -DGVDLL -Ih:\_TST\wm_lng_python__emerge\b\Python\include -Ih:\_TST\wm_lng_python__emerge\b\Python\Include /Tcpygraphviz/graphviz_wrap.c /Fobuild\temp.win-amd64-cpython-310\Release\pygraphviz/graphviz_wrap.obj
error: command 'cl.exe' failed: None
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pygraphviz
Building wheel for pygraphviz (setup.py): finished with status 'error'
Running setup.py clean for pygraphviz
Building wheel for python-louvain (setup.py): started
Building wheel for python-louvain (setup.py): finished with status 'done'
Created wheel for python-louvain: filename=python_louvain-0.16-py3-none-any.whl size=9403 sha256=4ea0f9bc163df04407b54569785c213906582a62984164a0a9816bfa2dbdb17e
ERROR: Could not build wheels for pygraphviz, which is required to install pyproject.toml-based projects
Stored in directory: :\Users\User\AppData\Local\Temp\pip-ephem-wheel-cache-zdh7onix\wheels\d0\b0\d7\6dd26c3817810fa379088eaeb755a01d9a2a411c37632079d1
Successfully built python-louvain
Failed to build pygraphviz
Have to run first :
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat
But https://github.com/pygraphviz/pygraphviz fails anyway as https://graphviz.org/download/source/ is not present.
Plus that include files are not to be inside subfolders but directly into ./Python/include/graphviz
.
Ok, it's a pygraphviz
bug since they do not provide wheels for Windows 10 AMD64 :
https://github.com/pygraphviz/pygraphviz/issues/197 https://github.com/pygraphviz/pygraphviz/issues/322 https://github.com/pygraphviz/pygraphviz/issues/374 https://github.com/pygraphviz/pygraphviz/issues/445 https://github.com/pygraphviz/pygraphviz/issues/454 https://github.com/pygraphviz/pygraphviz/pull/455 ...
Best option so far is
graphviz-8.x.y (64-bit) EXE installer
, not the ZIP (:warning: folder structure and files are different)C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat
set "LIB=%LIB%;C:\Program Files\Graphviz\lib"
python -m pip install --config-setting="--global-option=build_ext" --config-setting="--global-option="-IC:\Program Files\Graphviz\include" --config-setting="--global-option="-LC:\Program Files\Graphviz\lib" pygraphviz
Not really sure the compilation/linker options are passed through pip
so the LIB
environment variable is set prior to installation/compilation.
When installation is complete, you can do :
emerge -a PY
notepad py-template.yaml
source_directory: ./src
- directory: ./out/emerge
<- relative path is accepted, provided the folders exist (no auto mkdir
)emerge -c py-template.yaml
.\out\emerge\html\emerge.html
Regards.
@Kochise Sounds like you had quite a journey with this issue. Did you manage to get it running eventually?
@Kochise Update on this issue: I will probably try to remove the dependency to pygraphviz
in the upcoming/next version, since it is causing to much effort related to the setup on Apple Silicon or Windows setups (as mentioned in your issue). The next version of emerge will probably be released in 1-2 weeks (including bugfixes, but hopefully some exciting new features as well).
Then what are you going to use instead ? D3.js ?
Already removed pygraphviz locally, was only included for creating DOT files (but haven‘t used this format anyway). Yes, d3js is already the base of emerge‘s web app, this will stay. Next bigger release will be in about a week 🤞.
Thank you. Removing pygraphviz
as being an "unused" dependency will indeed help a lot toward deployment on platforms that have trouble with this package.
Windows 10 AMD64 20H2 Python
Works with regular
pip install emerge-viz
but is a bit "old".