1. 遇到问题的章节 / Affected Chapter
Chapter14
2. 问题类型 / Issue Type
代码错误 / Code Error
3. 具体问题描述 / Problem Description
执行“14.1.3 快速体验:5 分钟运行项目。”中后端部分环境配置中的如下部分时
# 2. 安装依赖
# 方式1:使用uv(推荐,更快的Python包管理器)
uv sync
# 方式2:使用pip
pip install -e .
出现报错
error: package directory 'src\src' does not exist
4. 问题重现材料 / Reproduction Materials
完整错误信息
PS E:\GIS_RS_IT\Mphil\agent\Deep Research\hello-agents\code\chapter14\helloagents-deepresearch\backend> pip install -e . Obtaining file:///E:/GIS_RS_IT/Mphil/agent/Deep%20Research/hello-agents/code/chapter14/helloagents-deepresearch/backend Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build editable ... error error: subprocess-exited-with-error × Getting requirements to build editable did not run successfully. │ exit code: 1 ╰─> [24 lines of output] C:\Users\Lenovo\AppData\Local\Temp\pip-build-env-mau8dsvv\overlay\Lib\site-packages\setuptools\config\expand.py:126: SetuptoolsWarning: File 'E:\GIS_RS_IT\Mphil\agent\Deep Research\hello-agents\code\chapter14\helloagents-deepresearch\backend\README.md' cannot be found return '\n'.join( C:\Users\Lenovo\AppData\Local\Temp\pip-build-env-mau8dsvv\overlay\Lib\site-packages\setuptools\config_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: project.license as a TOML table is deprecated !! ******************************************************************************** Please use a simple string containing a SPDX expression for project.license. You can also use project.license-files. (Both options available on setuptools>=77.0.0). By 2027-Feb-18, you need to update your project and remove deprecated calls or your builds will no longer be supported. See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! corresp(dist, value, root_dir) running egg_info creating src\helloagents_deep_researcher.egg-info writing src\helloagents_deep_researcher.egg-info\PKG-INFO writing dependency_links to src\helloagents_deep_researcher.egg-info\dependency_links.txt writing requirements to src\helloagents_deep_researcher.egg-info\requires.txt writing top-level names to src\helloagents_deep_researcher.egg-info\top_level.txt writing manifest file 'src\helloagents_deep_researcher.egg-info\SOURCES.txt' error: package directory 'src\src' does not exist [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build editable did not run successfully. │ exit code: 1 ╰─> See above for output.
5. 补充信息 / Additional Information
可能原因是Windows下路径严格,必须目录和包名完全对应。将 backend/pyproject.toml 中的
[tool.setuptools]
packages = ["src"]
改成
[tool.setuptools]
packages = { find = { where = ["src"] } }
可以解决。
确认事项 / Verification
1. 遇到问题的章节 / Affected Chapter
Chapter14
2. 问题类型 / Issue Type
代码错误 / Code Error
3. 具体问题描述 / Problem Description
执行“14.1.3 快速体验:5 分钟运行项目。”中后端部分环境配置中的如下部分时
出现报错
error: package directory 'src\src' does not exist4. 问题重现材料 / Reproduction Materials
完整错误信息
PS E:\GIS_RS_IT\Mphil\agent\Deep Research\hello-agents\code\chapter14\helloagents-deepresearch\backend> pip install -e . Obtaining file:///E:/GIS_RS_IT/Mphil/agent/Deep%20Research/hello-agents/code/chapter14/helloagents-deepresearch/backend Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build editable ... error error: subprocess-exited-with-error × Getting requirements to build editable did not run successfully. │ exit code: 1 ╰─> [24 lines of output] C:\Users\Lenovo\AppData\Local\Temp\pip-build-env-mau8dsvv\overlay\Lib\site-packages\setuptools\config\expand.py:126: SetuptoolsWarning: File 'E:\GIS_RS_IT\Mphil\agent\Deep Research\hello-agents\code\chapter14\helloagents-deepresearch\backend\README.md' cannot be found return '\n'.join( C:\Users\Lenovo\AppData\Local\Temp\pip-build-env-mau8dsvv\overlay\Lib\site-packages\setuptools\config_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: project.license as a TOML table is deprecated !! ******************************************************************************** Please use a simple string containing a SPDX expression for project.license. You can also use project.license-files. (Both options available on setuptools>=77.0.0). By 2027-Feb-18, you need to update your project and remove deprecated calls or your builds will no longer be supported. See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details. ******************************************************************************** !! corresp(dist, value, root_dir) running egg_info creating src\helloagents_deep_researcher.egg-info writing src\helloagents_deep_researcher.egg-info\PKG-INFO writing dependency_links to src\helloagents_deep_researcher.egg-info\dependency_links.txt writing requirements to src\helloagents_deep_researcher.egg-info\requires.txt writing top-level names to src\helloagents_deep_researcher.egg-info\top_level.txt writing manifest file 'src\helloagents_deep_researcher.egg-info\SOURCES.txt' error: package directory 'src\src' does not exist [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build editable did not run successfully. │ exit code: 1 ╰─> See above for output.
5. 补充信息 / Additional Information
可能原因是Windows下路径严格,必须目录和包名完全对应。将 backend/pyproject.toml 中的
改成
可以解决。
确认事项 / Verification