Python 3.x Jupyter笔记本上的PyPotrace pip安装错误

Python 3.x Jupyter笔记本上的PyPotrace pip安装错误,python-3.x,pip,jupyter-notebook,potrace,Python 3.x,Pip,Jupyter Notebook,Potrace,我试图在我的jupyter笔记本虚拟环境中安装potrace,但遇到了此错误代码。我已经找遍了jupyter笔记本上的任何已知修复程序,但我找不到任何修复程序,有人知道如何修复吗 根据第一条评论:我重新安装了pkg config(通过brew)并重新运行了该程序,但遗憾的是,该程序没有修复该问题 错误代码: pip install pypotrace Collecting pypotrace Using cached pypotrace-0.2.tar.gz (26 kB) ERR

我试图在我的jupyter笔记本虚拟环境中安装potrace,但遇到了此错误代码。我已经找遍了jupyter笔记本上的任何已知修复程序,但我找不到任何修复程序,有人知道如何修复吗

根据第一条评论:我重新安装了pkg config(通过brew)并重新运行了该程序,但遗憾的是,该程序没有修复该问题

错误代码:

pip install pypotrace

Collecting pypotrace
  Using cached pypotrace-0.2.tar.gz (26 kB)
    ERROR: Command errored out with exit status 1:
     command: /Users/user/.local/share/virtualenvs/user-c-cRme8X/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c0/fx27s5mn44d8wj3trxnn_0940000gn/T/pip-install-d3s_0svw/pypotrace/setup.py'"'"'; __file__='"'"'/private/var/folders/c0/fx27s5mn44d8wj3trxnn_0940000gn/T/pip-install-d3s_0svw/pypotrace/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/c0/fx27s5mn44d8wj3trxnn_0940000gn/T/pip-install-d3s_0svw/pypotrace/pip-egg-info
         cwd: /private/var/folders/c0/fx27s5mn44d8wj3trxnn_0940000gn/T/pip-install-d3s_0svw/pypotrace/
    Complete output (25 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/c0/fx27s5mn44d8wj3trxnn_0940000gn/T/pip-install-d3s_0svw/pypotrace/setup.py", line 4, in <module>
        setup()
      File "/private/var/folders/c0/fx27s5mn44d8wj3trxnn_0940000gn/T/pip-install-d3s_0svw/pypotrace/cysetuptools.py", line 149, in setup
        parsed_setup_cfg = parse_setup_cfg(fp, cythonize=cythonize)
      File "/private/var/folders/c0/fx27s5mn44d8wj3trxnn_0940000gn/T/pip-install-d3s_0svw/pypotrace/cysetuptools.py", line 222, in parse_setup_cfg
        return _expand_cython_modules(config, cythonize, pkg_config, base_dir)
      File "/private/var/folders/c0/fx27s5mn44d8wj3trxnn_0940000gn/T/pip-install-d3s_0svw/pypotrace/cysetuptools.py", line 230, in _expand_cython_modules
        module_dict = _expand_one_cython_module(config, section, cythonize,
      File "/private/var/folders/c0/fx27s5mn44d8wj3trxnn_0940000gn/T/pip-install-d3s_0svw/pypotrace/cysetuptools.py", line 239, in _expand_one_cython_module
        _expand_pkg_config_pkgs(config, section, pkg_config)
      File "/private/var/folders/c0/fx27s5mn44d8wj3trxnn_0940000gn/T/pip-install-d3s_0svw/pypotrace/cysetuptools.py", line 299, in _expand_pkg_config_pkgs
        extra_compile_args = pkg_config(pkg_names, '--cflags', env)
      File "/private/var/folders/c0/fx27s5mn44d8wj3trxnn_0940000gn/T/pip-install-d3s_0svw/pypotrace/cysetuptools.py", line 308, in _run_pkg_config
        return subprocess.check_output(['pkg-config', command] + pkg_names,
      File "/usr/local/Cellar/python@3.8/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 411, in check_output
        return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
      File "/usr/local/Cellar/python@3.8/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 489, in run
        with Popen(*popenargs, **kwargs) as process:
      File "/usr/local/Cellar/python@3.8/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 854, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "/usr/local/Cellar/python@3.8/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 1702, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: 'pkg-config'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
pip安装pypotrace
集水瓶
使用缓存的pypotrace-0.2.tar.gz(26 kB)
错误:命令出错,退出状态为1:
命令:/Users/user/.local/share/virtualenvs/user-c-cRme8X/bin/python3.8-c'import sys、setuptools、tokenize;sys.argv[0]=“private/var/folders/c0/fx27s5mn44d8wj3trxnn_0940000gn/T/pip-install-d3s_0svw/pypotrace/setup.py”__文件“'/private/var/folders/c0/fx27s5mn44d8wj3trxnn_0940000gn/T/pip-install-d3s_0svw/pypotrace/setup.py''”;f=getattr(标记化,“'open'”,open)(\uuuuu文件);code=f.read().replace(“\r\n”“”、“\n”“”);f、 close();exec(编译(代码,“'exec'”)“鸡蛋信息——鸡蛋库/private/var/folders/c0/fx27s5mn44d8wj3trxnn\u 0940000gn/T/pip-install-d3s\u 0svw/pypotrace/pip鸡蛋信息
cwd:/private/var/folders/c0/fx27s5mn44d8wj3trxnn_0940000gn/T/pip-install-d3s_0svw/pypotrace/
完整输出(25行):
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
文件“/private/var/folders/c0/fx27s5mn44d8wj3trxnn_0940000gn/T/pip-install-d3s_0svw/pypotrace/setup.py”,第4行,在
设置()
文件“/private/var/folders/c0/fx27s5mn44d8wj3trxnn_0940000gn/T/pip-install-d3s_0svw/pypotrace/cysetuptools.py”,第149行,位于安装程序中
已解析\u设置\u cfg=parse\u设置\u cfg(fp,cythonize=cythonize)
文件“/private/var/folders/c0/fx27s5mn44d8wj3trxnn\u 0940000gn/T/pip-install-d3s\u 0svw/pypotrace/cysetuptools.py”,第222行,在parse\u setup\u cfg中
return\u expand\u cython\u模块(config、cythonize、pkg\u config、base\u dir)
文件“/private/var/folders/c0/fx27s5mn44d8wj3trxnn\u 0940000gn/T/pip-install-d3s\u 0svw/pypotrace/cysetuptools.py”,第230行,在扩展cython\u模块中
module_dict=_expand_one_cython_module(配置、节、cythonize、,
文件“/private/var/folders/c0/fx27s5mn44d8wj3trxnn_0940000gn/T/pip-install-d3s_0svw/pypotrace/cysetuptools.py”,第239行,在“展开”一个cython模块中
_展开包装配置包装(配置,部分,包装配置)
文件“/private/var/folders/c0/fx27s5mn44d8wj3trxnn_0940000gn/T/pip-install-d3s_0svw/pypotrace/cysetuptools.py”,第299行,在扩展包装配置包装中
extra_compile_args=pkg_config(pkg_名称,'--cflags',env)
文件“/private/var/folders/c0/fx27s5mn44d8wj3trxnn_0940000gn/T/pip-install-d3s_0svw/pypotrace/cysetuptools.py”,第308行,在运行包配置中
返回子进程。检查\u输出(['pkg-config',command]+pkg\u名称,
文件“/usr/local/cillar”/python@3.8/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py”,检查输出中的第411行
返回运行(*popenargs,stdout=PIPE,timeout=timeout,check=True,
文件“/usr/local/cillar”/python@3.8/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py”,第489行,运行中
使用Popen(*popenargs,**kwargs)作为流程:
文件“/usr/local/cillar”/python@3.8/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py”,第854行,在__
self.\u execute\u child(参数、可执行文件、预执行文件、关闭文件、,
文件“/usr/local/cillar”/python@3.8/3.8.1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py”,第1702行,在执行子进程中
引发子项异常类型(错误号、错误消息、错误文件名)
FileNotFoundError:[Errno 2]没有这样的文件或目录:“pkg config”
----------------------------------------
错误:命令出错,退出状态为1:python setup.py egg_info检查日志以获得完整的命令输出。

感谢您的帮助!

您的错误显示缺少
pkg config
软件包。
请尝试使用以下方式安装它:
sudo apt install-y pkg config
(linux)或
brew install pkg config
(MacOS)

您好,感谢您的回复。我在pkg config上是最新的,我尝试重新安装pkg config并重新运行pip安装。不幸的是,这并没有解决问题。再次感谢您的输入。