Skip to content

Tutorial projects do not work in Colab because of dependency conflict. #1968

@palle-k

Description

@palle-k

Describe the bug
When launching the example projects in Google Colab (tested with basic example without elasticsearch and knowledge base example), importing haystack results in a ContextualVersionConflict.

Error message

ContextualVersionConflict                 Traceback (most recent call last)
<ipython-input-7-55c351f0b509> in <module>()
----> 1 from haystack.utils import clean_wiki_text, convert_files_to_dicts, fetch_archive_from_http, print_answers
      2 from haystack.nodes import FARMReader, TransformersReader

15 frames
/usr/local/lib/python3.7/dist-packages/pkg_resources/__init__.py in resolve(self, requirements, env, installer, replace_conflicting, extras)
    775                 # Oops, the "best" so far conflicts with a dependency
    776                 dependent_req = required_by[req]
--> 777                 raise VersionConflict(dist, req).with_context(dependent_req)
    778 
    779             # push the new requirements onto the stack

ContextualVersionConflict: (grpcio 1.42.0 (/usr/local/lib/python3.7/dist-packages), Requirement.parse('grpcio<1.38.0,>=1.22.0'), {'pymilvus'})

Expected behavior
Haystack should import without error.

Additional context
Google Colab with GPU runtime

To Reproduce

  1. Open colab example
  2. Change runtime type to GPU
  3. Run the first few cells of the notebook including the cell that imports haystack.

FAQ Check

System:

  • OS: Linux 76012de36819 5.4.144+
  • GPU/CPU: Nvidia Tesla K80 / Intel Xeon
  • Haystack version (commit or version number): latest master (0b0b968)
  • DocumentStore: InMemoryDocumentStore
  • Reader: FARMReader
  • Retriever: TfidfRetriever

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions