Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pygraphviz on RedHat installation issues #521

Open
zrecommender opened this issue Apr 9, 2024 · 0 comments
Open

pygraphviz on RedHat installation issues #521

zrecommender opened this issue Apr 9, 2024 · 0 comments

Comments

@zrecommender
Copy link

I have a venv with python3.10. yum install graphviz graphviz-devel ran fine.
Approach 1: pypi
pip install pygraphviz fails on

gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DSWIG_PYTHON_STRICT_BYTE_CHAR -I/local/home/eplamade/env-3.10/include -I/usr/local/include/python3.10 -c pygraphviz/graphviz_wrap.c -o build/temp.linux-x86_64-cpython-310/pygraphviz/graphviz_wrap.o
      In file included from /usr/include/graphviz/gvc.h:17:0,
                       from pygraphviz/graphviz_wrap.c:3021:
      /usr/include/graphviz/types.h:49:10: fatal error: cgraph.h: No such file or directory

cgraph.h is in fact present under /usr/include/graphviz.
The library seems to be under:

(env-3.10) ➜  Dev ll /usr/lib64 | grep graphviz                                                                                                                                                                                                                                                                                                    ~/Dev
drwxr-xr-x  3 root root  4.0K Apr  7 00:31 graphviz

Approach 2: Point to the verified correct folders.

cd pygraphviz
python setup.py build_ext -I/usr/include/graphviz -L/usr/lib64 -R /usr/lib64 -lgvc
pip3 install .

all successful. Then

(env-3.10) ➜  ~ python -c "import pygraphviz"                                                                                                                                                                                                                                                                                                          ~
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/local/home/user/env-3.10/lib/python3.10/site-packages/pygraphviz/__init__.py", line 24, in <module>
    from .agraph import AGraph, Node, Edge, Attribute, ItemAttribute, DotError
  File "/local/home/user/env-3.10/lib/python3.10/site-packages/pygraphviz/agraph.py", line 16, in <module>
    from . import graphviz as gv
  File "/local/home/user/env-3.10/lib/python3.10/site-packages/pygraphviz/graphviz.py", line 10, in <module>
    from . import _graphviz
ImportError: /local/home/user/env-3.10/lib/python3.10/site-packages/pygraphviz/_graphviz.cpython-310-x86_64-linux-gnu.so: undefined symbol: gvFreeRenderDat```
@zrecommender zrecommender changed the title pygraphviz on Amazon Linux installation issues pygraphviz on RedHat installation issues Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant