ModuleNotFoundError:没有名为“chains”的模块

问题描述 投票:0回答:1

我正在我的 GoogleColab 中运行 langgraph。我正在尝试导入generate_chain&reflection_chain。所以我写了

from chains import generate_chain, reflection_chain

但它抛出错误

ModuleNotFoundError: No module named 'chains'

所以我尝试使用以下命令安装链

!pip install chains

但它抛出错误

   Collecting chains
  Using cached chains-0.2.0-py2.py3-none-any.whl.metadata (5.7 kB)
Collecting dpkt (from chains)
  Using cached dpkt-1.9.8-py3-none-any.whl.metadata (1.7 kB)
Collecting netifaces (from chains)
  Using cached netifaces-0.11.0.tar.gz (30 kB)
  Preparing metadata (setup.py) ... done
Collecting pcapy (from chains)
  Using cached pcapy-0.11.4.tar.gz (37 kB)
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  Preparing metadata (setup.py) ... error
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

你能帮我解决这个问题吗

python google-colaboratory langgraph
1个回答
0
投票

似乎是

pcapy
的问题,并且似乎这个问题不会很快得到解决...

你可以尝试使用

pcapy-ng
,似乎他们已经解决了这个问题(link

© www.soinside.com 2019 - 2024. All rights reserved.