Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

《选修-Building and Evaluating Advanced RAG Applications》课程给的requirements.txt存在Dependency Hell #180

Open
LinsCodes opened this issue Feb 28, 2025 · 0 comments

Comments

@LinsCodes
Copy link

Dependency Hell

我用的conda 安装的虚拟环境是python 3.11.11(conda create --name xxxx python=3.11 -y) ,安装依赖时(pip install -r requirements.txt)发现
出现如下报错:

ERROR: Cannot install -r requirements.txt (line 101), -r requirements.txt (line 118),-r requirements.txt (line 111), -r reguirements.txt (line 3), -r requirements.txt (line 4),-r reguirements.txt (line 47), -r requirements.txt (line 71),-r requirements.txt (line 94) and typing extensions==4.5.0 because these package versions
have conflicting dependencies.
The conflict is caused by:

        The user requested typing extensions==4.5.0
        aiostream 0.5.2 depends on typing-extensions
        alembic 1.13.1 depends on typing-extensions>=4
        huggingface-hub 0.21.4 depends on typing-extensions>=3.7.4.3
        llama-index 0.9.8 depends on typing-extensions>=4.5.0
        openai 1.3.5 depends on typing-extensions<5 and >=4.5
        pinecone-client 3.1.0 depends on typing-extensions>=3.7.4
        pydantic 1.10.14 depends on typing-extensions>=4.2.0
        pydantic-core 2.16.3 depends on typing-extensions!=4.7.0 and >=4.6.0

        To fix this you could try to:
        1. loosen the range of package versions you've specified
        2. remove package versions to allow pip to attempt to solve the dependency conflict
        3. 
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

总结来看:

    requirements.txt显式指定了` typing_extensions==4.5.0`。
    但多个依赖包(如llama-index, pydantic-core, openai等)要求更高版本:
    llama-index: >=4.5.0
    pydantic-core: >=4.6.0 且 !=4.7.0
    openai: >=4.5 且 <5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant