Python 如何在ubuntu 18.04中正确安装TrustTrees库?

Python 如何在ubuntu 18.04中正确安装TrustTrees库?,python,pip,Python,Pip,TrustTrees是一个基于python的子域枚举工具。安装TrustTrees python库时,会显示错误消息。我不知道怎么解决它。以下是错误跟踪 command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-m199of9z/pygraphviz/setup.py'"'"'; __file__='"'"'/tmp/pip-install-m

TrustTrees是一个基于python的子域枚举工具。安装TrustTrees python库时,会显示错误消息。我不知道怎么解决它。以下是错误跟踪

   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-m199of9z/pygraphviz/setup.py'"'"'; __file__='"'"'/tmp/pip-install-m199of9z/pygraphviz/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-f5wljx0z --python-tag cp36
       cwd: /tmp/pip-install-m199of9z/pygraphviz/
  Complete output (50 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/pygraphviz
  copying pygraphviz/release.py -> build/lib.linux-x86_64-3.6/pygraphviz
  copying pygraphviz/version.py -> build/lib.linux-x86_64-3.6/pygraphviz
  copying pygraphviz/agraph.py -> build/lib.linux-x86_64-3.6/pygraphviz
  copying pygraphviz/graphviz.py -> build/lib.linux-x86_64-3.6/pygraphviz
  copying pygraphviz/__init__.py -> build/lib.linux-x86_64-3.6/pygraphviz
  creating build/lib.linux-x86_64-3.6/pygraphviz/tests
  copying pygraphviz/tests/test_node_attributes.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
  copying pygraphviz/tests/test_html.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
  copying pygraphviz/tests/test.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
  copying pygraphviz/tests/test_string.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
  copying pygraphviz/tests/test_subgraph.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
  copying pygraphviz/tests/test_layout.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
  copying pygraphviz/tests/test_edge_attributes.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
  copying pygraphviz/tests/test_unicode.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
  copying pygraphviz/tests/test_attribute_defaults.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
  copying pygraphviz/tests/test_graph.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
  copying pygraphviz/tests/test_attributes.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
  copying pygraphviz/tests/test_drawing.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
  copying pygraphviz/tests/test_clear.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
  copying pygraphviz/tests/__init__.py -> build/lib.linux-x86_64-3.6/pygraphviz/tests
  copying pygraphviz/tests/test_readwrite.py -> build/lib.linux-x86_64-3.6/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 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'
  writing manifest file 'pygraphviz.egg-info/SOURCES.txt'
  copying pygraphviz/graphviz.i -> build/lib.linux-x86_64-3.6/pygraphviz
  copying pygraphviz/graphviz_wrap.c -> build/lib.linux-x86_64-3.6/pygraphviz
  running build_ext
  building 'pygraphviz._graphviz' extension
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/pygraphviz
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c pygraphviz/graphviz_wrap.c -o build/temp.linux-x86_64-3.6/pygraphviz/graphviz_wrap.o
  pygraphviz/graphviz_wrap.c:130:11: fatal error: Python.h: No such file or directory
   # include <Python.h>
             ^~~~~~~~~~
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pygraphviz
  Running setup.py clean for pygraphviz
Failed to build pygraphviz
Installing collected packages: pygraphviz, TrustTrees
    Running setup.py install for pygraphviz ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-m199of9z/pygraphviz/setup.py'"'"'; __file__='"'"'/tmp/pip-install-m199of9z/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-oysqalc0/install-record.txt --single-version-externally-managed --compile
         cwd: /tmp/pip-install-m199of9z/pygraphviz/
    Complete output (29 lines):
    running install
    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 "<string>", line 1, in <module>
      File "/tmp/pip-install-m199of9z/pygraphviz/setup.py", line 87, in <module>
        tests_require=['nose>=0.10.1', 'doctest-ignore-unicode>=0.1.0',],
      File "/usr/local/lib/python3.6/dist-packages/setuptools/__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/tmp/pip-install-m199of9z/pygraphviz/setup_commands.py", line 44, in modified_run
        self.include_path, self.library_path = get_graphviz_dirs()
      File "/tmp/pip-install-m199of9z/pygraphviz/setup_extra.py", line 121, in get_graphviz_dirs
        include_dirs, library_dirs = _pkg_config()
      File "/tmp/pip-install-m199of9z/pygraphviz/setup_extra.py", line 44, in _pkg_config
        output = S.check_output(['pkg-config', '--libs-only-L', 'libcgraph'])
      File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
        **kwargs).stdout
      File "/usr/lib/python3.6/subprocess.py", line 438, in run
        output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command '['pkg-config', '--libs-only-L', 'libcgraph']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-m199of9z/pygraphviz/setup.py'"'"'; __file__='"'"'/tmp/pip-install-m199of9z/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-oysqalc0/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
命令:/usr/bin/python3-u-c'import sys,setuptools,tokenize;sys.argv[0]=“””/tmp/pip-install-m199of9z/pygraphviz/setup.py“”__文件_uuz=“””/tmp/pip-install-m199of9z/pygraphviz/setup.py“”;f=getattr(标记化,“'open'”,open)(\uuuuu文件);code=f.read().replace(“\r\n”“”、“\n”“”);f、 close();exec(编译(代码,_u文件,“'exec'”)'bdist_wheel-d/tmp/pip-wheel-f5wljx0z--python标记cp36
cwd:/tmp/pip-install-m199of9z/pygraphviz/
完整输出(50行):
运转的车轮
运行构建
运行build\u py
创建构建
创建build/lib.linux-x86_64-3.6
创建build/lib.linux-x86_64-3.6/pygraphviz
复制pygraphviz/release.py->build/lib.linux-x86_64-3.6/pygraphviz
复制pygraphviz/version.py->build/lib.linux-x86_64-3.6/pygraphviz
复制pygraphviz/agraph.py->build/lib.linux-x86_64-3.6/pygraphviz
复制pygraphviz/graphviz.py->build/lib.linux-x86_64-3.6/pygraphviz
正在复制pygraphviz/_init__u;.py->build/lib.linux-x86_64-3.6/pygraphviz
创建build/lib.linux-x86_64-3.6/pygraphviz/tests
复制pygraphviz/tests/test_node_attributes.py->build/lib.linux-x86_64-3.6/pygraphviz/tests
复制pygraphviz/tests/test_html.py->build/lib.linux-x86_64-3.6/pygraphviz/tests
复制pygraphviz/tests/test.py->build/lib.linux-x86_64-3.6/pygraphviz/tests
复制pygraphviz/tests/test_string.py->build/lib.linux-x86_64-3.6/pygraphviz/tests
复制pygraphviz/tests/test_subgraph.py->build/lib.linux-x86_64-3.6/pygraphviz/tests
复制pygraphviz/tests/test_layout.py->build/lib.linux-x86_64-3.6/pygraphviz/tests
复制pygraphviz/tests/test_edge_attributes.py->build/lib.linux-x86_64-3.6/pygraphviz/tests
复制pygraphviz/tests/test_unicode.py->build/lib.linux-x86_64-3.6/pygraphviz/tests
复制pygraphviz/tests/test_属性_defaults.py->build/lib.linux-x86_64-3.6/pygraphviz/tests
复制pygraphviz/tests/test_graph.py->build/lib.linux-x86_64-3.6/pygraphviz/tests
复制pygraphviz/tests/test_attributes.py->build/lib.linux-x86_64-3.6/pygraphviz/tests
复制pygraphviz/tests/test_drawing.py->build/lib.linux-x86_64-3.6/pygraphviz/tests
复制pygraphviz/tests/test_clear.py->build/lib.linux-x86_64-3.6/pygraphviz/tests
正在复制pygraphviz/tests/_init__u;.py->build/lib.linux-x86_64-3.6/pygraphviz/tests
复制pygraphviz/tests/test_readwrite.py->build/lib.linux-x86_64-3.6/pygraphviz/tests
运行蛋_信息
正在编写pygraphviz.egg-info/PKG-info
正在将dependency_链接写入pygraphviz.egg-info/dependency_links.txt
将顶级名称写入pygraphviz.egg-info/top_level.txt
正在读取清单文件“pygraphviz.egg info/SOURCES.txt”
正在读取清单模板“manifest.in”
警告:在发行版中找不到以前包含的与“*~”匹配的文件
警告:在发行版中找不到以前包含的与“*.pyc”匹配的文件
警告:在发行版中找不到以前包含的与“.svn”匹配的文件
未找到与“文档/生成”匹配的以前包含的目录
正在写入清单文件“pygraphviz.egg info/SOURCES.txt”
复制pygraphviz/graphviz.i->build/lib.linux-x86_64-3.6/pygraphviz
复制pygraphviz/graphviz_wrap.c->build/lib.linux-x86_64-3.6/pygraphviz
运行build_ext
建筑“pygraphviz.\u graphviz”扩建
创建build/temp.linux-x86_64-3.6
创建build/temp.linux-x86_64-3.6/pygraphviz
x86_64-linux-gnu-gcc-pthread-DNDEBUG-g-fwrapv-O2-Wall-g-fstack protector-strong-Wformat-Werror=格式安全性-Wdate-time-D_-FORTIFY_-SOURCE=2-fPIC-I/usr/include/python3.6m-c pygraphviz/graphviz-wrap.c-o build/temp.linux-x86_64-3.6/pygraphviz/graphviz-wrap.o
pygraphviz/graphviz_wrap.c:130:11:致命错误:Python.h:没有这样的文件或目录
#包括
^~~~~~~~~~
编译终止。
错误:命令“x86_64-linux-gnu-gcc”失败,退出状态为1
----------------------------------------
错误:为pygraphviz构建控制盘失败
为pygraphviz运行setup.py clean
未能生成pygraphviz
安装收集的软件包:pygraphviz、TrustTrees
正在为pygraphviz运行setup.py安装。。。错误
错误:命令出错,退出状态为1:
命令:/usr/bin/python3-u-c'import sys,setuptools,tokenize;sys.argv[0]=“””/tmp/pip-install-m199of9z/pygraphviz/setup.py“”__文件_uuz=“””/tmp/pip-install-m199of9z/pygraphviz/setup.py“”;f=getattr(标记化,“'open'”,open)(\uuuuu文件);code=f.read().replace(“\r\n”“”、“\n”“”);f、 close();exec(compile(代码,_u文件,“'exec'”)'安装--record/tmp/pip-record-oysqalc0/install-record.txt--外部管理的单一版本--编译
cwd:/tmp/pip-install-m199of9z/pygraphviz/
完整输出(29行):
正在运行的安装
正在尝试pkg配置
在pkg配置搜索路径中找不到包libcgraph。
也许您应该添加包含“libcgraph.pc”的目录
到PKG_CONFIG_PATH环境变量
找不到程序包“libcgraph”
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
文件“/tmp/pip-install-m199of9z/pygraphviz/setup.py”,第87行,在
测试要求=['nose>=0.10.1','doctest忽略unicode>=0.1.0',],
文件“/usr/local/lib/python3.6/dist-packages/setuptools/_init__;.py”,安装程序中第145行
返回distutils.core.setup(**attrs)
文件“/usr/lib/python3.6/distutils/core.py”,第148行,在安装程序中
dist.run_命令()
文件“/usr/lib/python3.6/distutils/dist.py”,第955行,在run_命令中
self.run_命令(cmd)
文件“/usr/lib/python3.6/distutils/dist.py”,第974行,在run_命令中
cmd_obj.run()
文件“/tmp/pip-ins