-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[BUG] option --include-path not recognized (pygraphviz) #2740
Comments
Hi @anastasiiakim. I don't think this is a setuptools issue. If I search I believe this could be an Anaconda issue, or even a pip issue, I'm not sure. Any suggestions from the maintainers? |
You can pass extra commands and options to pip install --global-option=build_ext --global-option="-I/usr/local/include/graphviz/" \
--global-option="-L/usr/local/lib/graphviz" pygraphviz I think what you are missing was the initial passing of python setup.py build_ext -I/usr/local/include/graphviz/ -L/usr/local/lib/graphviz --inplace && pip install . This will manually trigger the |
From my reading it looks like the issue was addressed. Thanks for reporting and thanks everyone for chiming in to help. |
Just to add to the above, if you've installed graphviz via homebrew (as of 3.0.0) the paths are as follows.
EDIT: I ran into other issues after that, so if you're using Conda as I was, it's probably easier to just do
...as mentioned in pygraphviz/pygraphviz#400 |
Above almost worked for me, but my homebrew (version 3.4.7) had a different path: |
@csquires, Thank you that worked for me as well. |
python3.10 brew install graphviz |
It looks like the documentation for quick-start in Readme.md is outdated. Maybe we should replace --install-option with : |
For Windows users, this took me waaayyyy too long to work out: |
Can confirm. This was painful. |
Wow, more than 2.5 years since I last commented and this thread is still relevant. For any other future PyGraphviz users, the installation docs should be very helpful as it more or less addresses all the issues raised here, e.g. include/linker search paths when building via Although it would be nice if the PyGraphviz folks could pre-package standalone binary wheels a la NumPy, etc., they mention in the PyGraphviz documentation install guide that there are a few complications regarding this since the way the PyGraphviz extension is built requires Graphviz executables, libraries, and headers to be available at compile time as mentioned in the installation FAQ. Graphviz has existed for far longer than PyGraphviz has and was originally a standalone set of C programs + libraries typically called from the command line, e.g. the In a sense you can consider this building-from-source exercise a modern taste of the old |
make sure to also upgrade pip on windows with: In case you get an error using the above pip3 install command like:
I my case this upgraded pip from 23.0.1 to 24.0 |
setuptools version
57.4.0
Python version
3.8.5
OS
10.15.7 Catalina
Additional environment information
No response
Description
Posted the issue here:pygraphviz/pygraphviz#361
Tried to install with --include-option and --global-option but it fails:
pip install --global-option="-I/usr/local/include/graphviz/" --global-option="-L/usr/local/lib/graphviz" pygraphviz
pip install pygraphviz --install-option="--include-path=/usr/local/include/graphviz/" --install-option="--library-path=/usr/local/lib/graphviz"
Expected behavior
I installed graphviz but it seems pip install pygraphviz doesn't know where the graphviz is so I tried to include path to it with --include-path and global-options, but they are not recognizable.
How to Reproduce
Output
Code of Conduct
The text was updated successfully, but these errors were encountered: