poetry init --name privategpt --python “>=3.10“ --dependency gradio 报错!

发布于:2025-06-19 ⋅ 阅读:(12) ⋅ 点赞:(0)

powersys@powerSys:~/work/privategpt-gradio$ poetry init --name privategpt --python ">=3.10" --dependency gradio

This command will guide you through creating your pyproject.toml config.

Version [0.1.0]:  
Description []:  
  
License []:  


Using version ^5.34.1 for gradio
Would you like to define your main dependencies interactively? (yes/no) [yes]         You can specify a package in the following forms:
          - A single name (requests): this will search for matches on PyPI
          - A name and a constraint (requests@^2.23.0)
          - A git url (git+https://github.com/python-poetry/poetry.git)
          - A git url with a revision         (git+https://github.com/python-poetry/poetry.git#develop)
          - A file path (../my-package/my-package.whl)
          - A directory (../my-package/)
          - A url (https://example.com/packages/my-package-0.1.0.tar.gz)
        
Package to add or search for (leave blank to skip): 

Would you like to define your development dependencies interactively? (yes/no) [yes] no
Generated file

 
]
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
    "gradio (>=5.34.1,<6.0.0)"
]


[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"


Do you confirm generation? (yes/no) [yes] yes
powersys@powerSys:~/work/privategpt-gradio$ poetry add langchain chromadb transformers sentence-transformers pypdf llama-cpp-python
Creating virtualenv privategpt-Y-hDIRIf-py3.11 in /home/powersys/.cache/pypoetry/virtualenvs
Using version ^0.3.25 for langchain
Using version ^1.0.12 for chromadb
Using version ^4.52.4 for transformers
Using version ^4.1.0 for sentence-transformers
Using version ^5.6.0 for pypdf
Using version ^0.3.9 for llama-cpp-python

Updating dependencies
Resolving dependencies... (43.4s)
Resolving dependencies... (43.5s)
The current project's supported Python range (>=3.10) is not compatible with some of the required packages Python requirement:
  - langchain-text-splitters requires Python <4.0,>=3.9, so it will not be installable for Python >=4.0

Because no versions of langchain match >0.3.25,<0.4.0
 and langchain (0.3.25) depends on langchain-text-splitters (>=0.3.8,<1.0.0), langchain (>=0.3.25,<0.4.0) requires langchain-text-splitters (>=0.3.8,<1.0.0).
Because langchain-text-splitters (0.3.8) requires Python <4.0,>=3.9
 and no versions of langchain-text-splitters match >0.3.8,<1.0.0, langchain-text-splitters is forbidden.
Thus, langchain is forbidden.
So, because privategpt depends on langchain (^0.3.25), version solving failed.

  * Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties

    For langchain-text-splitters, a possible solution would be to set the `python` property to ">=3.10,<4.0"

    https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,
    https://python-poetry.org/docs/dependency-specification/#using-environment-markers


网站公告

今日签到

点亮在社区的每一天
去签到