RenqiChen / Social_Science

Multi-Agent System for Science of Science
https://renqichen.github.io/Social_Science/
Apache License 2.0
24 stars 7 forks source link

agentscope #5

Closed NAMEKDSUN closed 2 days ago

NAMEKDSUN commented 2 days ago

Traceback (most recent call last): File "/home/ecs-user/Social_Science/sci_platform/run.py", line 1, in from sci_platform import Platform File "/home/ecs-user/Social_Science/sci_platform/sci_platform.py", line 13, in from agentscope.agents import SciAgent ImportError: cannot import name 'SciAgent' from 'agentscope.agents' (/home/ecs-user/anaconda3/envs/science/lib/python3.11/site-packages/agentscope/agents/init.py) 运行run.py文件报错,没有办法从项目中的agentscope导入SciAgent

RenqiChen commented 2 days ago

这个是SciAgent所在的路径 image

NAMEKDSUN commented 2 days ago

image 明白,我看代码中存在导入agentscope所在的文件路径,但是依然报ImportError: cannot import name 'SciAgent' from 'agentscope.agents' (/home/ecs-user/anaconda3/envs/science/lib/python3.11/site-packages/agentscope/agents/init.py)

KuKuKuKuKuKurisu commented 2 days ago

可以print一下sys.path吗

NAMEKDSUN commented 2 days ago

['/home/ecs-user/Social_Science/sci_platform', '/home/ecs-user/anaconda3/envs/science/lib/python311.zip', '/home/ecs-user/anaconda3/envs/science/lib/python3.11', '/home/ecs-user/anaconda3/envs/science/lib/python3.11/lib-dynload', '/home/ecs-user/anaconda3/envs/science/lib/python3.11/site-packages', '../agentscope-main/src']

NAMEKDSUN commented 2 days ago

根据报错显示他并没有去项目中的agentscope寻找SciAgent,而是从使用pip install的agentscope寻找SciAgent

NAMEKDSUN commented 2 days ago

找到了解决办法,不要使用pip install agentscope来进行安装,使用开发者模型进行安装agentscope:pip install -e . ref:https://github.com/modelscope/agentscope/blob/main/README.md image

NAMEKDSUN commented 1 day ago

我看您修改文档了,使用pip install -e.安装agentscope,必须要把agentscope的readme文档放在agentscope-main目录下才可以

RenqiChen commented 1 day ago

我们把setup.py里面这部分代码改掉了,尝试过可以正常安装