[BUG] option --include-path not recognized (pygraphviz)
See original GitHub issuesetuptools version
57.4.0
Python version
3.8.5
OS
10.15.7 Catalina
Additional environment information
No response
Description
Posted the issue here:https://github.com/pygraphviz/pygraphviz/issues/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
brew install graphviz
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"
Output
Collecting pygraphviz
Using cached pygraphviz-1.7.zip (118 kB)
Skipping wheel build for pygraphviz, due to binaries being disabled for it.
Installing collected packages: pygraphviz
Running setup.py install for pygraphviz ... error
ERROR: Command errored out with exit status 1:
command: /opt/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/z1/9v98kv1j6kj_wdm9f2v1x7s80012jb/T/pip-install-opnitgqo/pygraphviz_940432cb2c62475896c051ed944a799d/setup.py'"'"'; file='"'"'/private/var/folders/z1/9v98kv1j6kj_wdm9f2v1x7s80012jb/T/pip-install-opnitgqo/pygraphviz_940432cb2c62475896c051ed944a799d/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/z1/9v98kv1j6kj_wdm9f2v1x7s80012jb/T/pip-record-w717thbz/install-record.txt --single-version-externally-managed --compile --install-headers /opt/anaconda3/include/python3.8/pygraphviz --include-path=/usr/local/include/graphviz/ --library-path=/usr/local/lib/graphviz
cwd: /private/var/folders/z1/9v98kv1j6kj_wdm9f2v1x7s80012jb/T/pip-install-opnitgqo/pygraphviz_940432cb2c62475896c051ed944a799d/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: option --include-path not recognized
----------------------------------------
ERROR: Command errored out with exit status 1: /opt/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/z1/9v98kv1j6kj_wdm9f2v1x7s80012jb/T/pip-install-opnitgqo/pygraphviz_940432cb2c62475896c051ed944a799d/setup.py'"'"'; file='"'"'/private/var/folders/z1/9v98kv1j6kj_wdm9f2v1x7s80012jb/T/pip-install-opnitgqo/pygraphviz_940432cb2c62475896c051ed944a799d/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/z1/9v98kv1j6kj_wdm9f2v1x7s80012jb/T/pip-record-w717thbz/install-record.txt --single-version-externally-managed --compile --install-headers /opt/anaconda3/include/python3.8/pygraphviz --include-path=/usr/local/include/graphviz/ --library-path=/usr/local/lib/graphviz Check the logs for full command output.
Code of Conduct
- I agree to follow the PSF Code of Conduct
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
howto install pygraphviz on windows 10 64bit - Stack Overflow
I tried anaconda with python 3.5 64bit & 32bit with no success. Here is the error I am getting with python 3.5 32bit...
Read more >pygraphviz won't install : PY-25138 - JetBrains YouTrack
'''Error message when I try to install pygraphviz 1.4''' Collecting ... Failed to find dotneato-config Your Graphviz installation could not be found.
Read more >graphviz2drawio - PyPI
Convert graphviz (dot) files into draw.io (mxGraph) format. ... pip3 install pygraphviz --install-option="--include-path=/usr/local/include/graphviz" ...
Read more >Install — PyGraphviz 1.10 documentation
Providing path to Graphviz If you've installed Graphviz and pip is unable to find Graphviz, then you need to provide pip with the...
Read more >Trying to install pygraphviz on windows is a real pain - Medium
It will not find graphviz dependency files because you dont't have ... install pygraphviz --install-option="--include-path=C:\Program Files ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
install
command help does not show any--include-path
flag./usr/local/include
should be part of the system include path and so you shouldn’t need to specify headers, but if you need to, I think what you are looking for is probably the--include-dirs/-I
flag forbuild_ext
, which must be run to build thepygraphviz._graphviz
C extension in thepygraphviz
setup.py
.You can pass extra commands and options to
setup.py
before theinstall
command with--global-option
, so following the example in thepygraphviz
documentation, try something likeI think what you are missing was the initial passing of
build_ext
topip
before the-I
,-L
flags. Worse comes to worse, you can always clone thepygraphviz
repo, checkout the desired tag, and in the repo home runThis will manually trigger the
build_ext
command with the right flags, build thepygraphviz._graphviz
C extension inplace (shared object in same directory as the source file) and then do a properpip install
of the package.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 https://github.com/pygraphviz/pygraphviz/issues/400