carpedm20 / ENAS-pytorch

PyTorch implementation of "Efficient Neural Architecture Search via Parameters Sharing"
Apache License 2.0
2.69k stars 492 forks source link

pygraphviz can not be installed #52

Open Light-- opened 4 years ago

Light-- commented 4 years ago

$ sudo pip3 install pygraphviz WARNING: The directory '/home/usr1/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting pygraphviz Downloading https://pypi.tuna.tsinghua.edu.cn/packages/7e/b1/d6d849ddaf6f11036f9980d433f383d4c13d1ebcfc3cd09bc845bda7e433/pygraphviz-1.5.zip (117 kB) |████████████████████████████████| 117 kB 11.0 MB/s Installing collected packages: pygraphviz Running setup.py install for pygraphviz ... error ERROR: Command errored out with exit status 1: command: /usr/local/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0z76ssje/pygraphviz/setup.py'"'"'; file='"'"'/tmp/pip-install-0z76ssje/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 /tmp/pip-record-_abu592r/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/pygraphviz cwd: /tmp/pip-install-0z76ssje/pygraphviz/ Complete output (34 lines): running install Trying dpkg dpkg-query: no path found matching pattern graphviz Could not run dpkg Trying pkg-config Package libcgraph was not found in the pkg-config search path. Perhaps you should add the directory containing `libcgraph.pc' to the PKG_CONFIG_PATH environment variable No package 'libcgraph' found Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-0z76ssje/pygraphviz/setup.py", line 70, in setup( File "/usr/local/lib/python3.8/site-packages/setuptools/init.py", line 145, in setup return distutils.core.setup(*attrs) File "/usr/local/lib/python3.8/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/local/lib/python3.8/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/local/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/tmp/pip-install-0z76ssje/pygraphviz/setup_commands.py", line 44, in modified_run self.include_path, self.library_path = get_graphviz_dirs() File "/tmp/pip-install-0z76ssje/pygraphviz/setup_extra.py", line 162, in get_graphviz_dirs include_dirs, library_dirs = _try_configure(include_dirs, library_dirs, _pkg_config) File "/tmp/pip-install-0z76ssje/pygraphviz/setup_extra.py", line 117, in _try_configure i, l = try_function() File "/tmp/pip-install-0z76ssje/pygraphviz/setup_extra.py", line 72, in _pkg_config output = S.check_output(['pkg-config', '--libs-only-L', 'libcgraph']) File "/usr/local/lib/python3.8/subprocess.py", line 411, in check_output return run(popenargs, stdout=PIPE, timeout=timeout, check=True, File "/usr/local/lib/python3.8/subprocess.py", line 512, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['pkg-config', '--libs-only-L', 'libcgraph']' returned non-zero exit status 1.

ERROR: Command errored out with exit status 1: /usr/local/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0z76ssje/pygraphviz/setup.py'"'"'; file='"'"'/tmp/pip-install-0z76ssje/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 /tmp/pip-record-_abu592r/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/pygraphviz Check the logs for full command output.

Evelyn-coder commented 4 years ago

sudo yum install graphviz sudo yum install graphviz-devel pip install pygraphviz

biel-wangdf3 commented 3 years ago
pygraphviz/graphviz_wrap.c:2711:10: fatal error: graphviz/cgraph.h: No such file or directory
 #include "graphviz/cgraph.h"
          ^~~~~~~~~~~~~~~~~~~

sudo apt install libgraphviz-dev pip install pygraphviz