1. 安装pipx,地址:https://github.com/pypa/pipx
  2. 安装poetry,地址:https://python-poetry.org/docs
  3. 复制starter_template到本地:https://github.com/joaomdmoura/crewAI-examples
  4. 根目录创建pyproject.toml文件,内容如下:

    [tool.poetry]
    name = "trip-planner-yt"
    version = "1.0.0"
    description = "A simple AI trip planner"
    authors = ["Alex Mao"]

    [tool.poetry.dependencies]
    python = ">=3.10.0,<3.12"
    crewai = "0.1.24"
    unstructured = '==0.10.25'
    pyowm = '3.3.0'
    tools = "^0.1.9"
    python-dotenv = "1.0.0"

    [tool.pyright]
    useLibraryCodeForTypes = true
    exclude = [".cache"]

    [tool.ruff]
    select = ['E', 'W', 'F', 'I', 'B', 'C4', 'ARG', 'SIM']
    ignore = ['W291', 'W292', 'W293']

    [build-system]
    requires = ["poetry-core>=1.0.0"]
    build-backend = "poetry.core.masonry.api"

  5. 运行安装命令

    poetry install --no-root

  6. 如果要进入python环境,可以运行

    poetry shell

最后编辑:2024年05月21日 ©著作权归作者所有

发表评论