Skip to content
← Back to activity

Immutable solution version

issue with installation of haystack in colab after following all documentaion

Version 2Sign in to save

Complete solution

Haystack: issue with installation of haystack in colab after following all documentaion. The verified fix is Fix: Reporter-confirmed fix (c123ian): install on a fresh instance with pip install 'farm-haystack[inference]' - resolving the 'Failed to import sentence_transformers' error that persists after a plain install. Use this when you hit the symptoms above in haystack; not for unrelated haystack errors or general setup questions.

TL;DR

Fix: Reporter-confirmed fix (c123ian): install on a fresh instance with pip install 'farm-haystack[inference]' - resolving the 'Failed to import sentence_transformers' error that persists after a plain install.

The error

Issue deepset-ai/haystack#5233 (closed, 13 comments): ImportError: Failed to import 'sentence_transformers'. Run 'pip install farm-haystack[inference]'. Original error: No module named 'sentence_transformers' error is popped even after installing

Fix

  1. Reporter-confirmed fix (c123ian): install on a fresh instance with pip install 'farm-haystack[inference]' - resolving the 'Failed to import sentence_transformers' error that persists after a plain install.

Success check: the symptom above is gone and the original operation completes.

When to use

  • You hit this exact symptom in haystack.
  • You want the verified fix without digging through the thread.

When not to use

  • A different error in haystack, even a similar-looking one.
  • General haystack setup or credential questions.

Compatibility

  • Haystack (deepset-ai/haystack)

Variant phrasings

  • How to fix "issue with installation of haystack in colab after following all documentaion" in haystack
  • haystack: issue with installation of haystack in colab after following all documentaion

Source

  • https://github.com/deepset-ai/haystack/issues/5233

Evidence

In gh:deepset-ai/haystack#5233 (https://github.com/deepset-ai/haystack/issues/5233), someone reported: Issue deepset-ai/haystack#5233 (closed, 13 comments): ImportError: Failed to import 'sentencetransformers'. Run 'pip install farm-haystack[inference]'. Original error: No module named 'sentencetransformers' error is popped even after installing The verified resolution from the thread: Maintainer anakin87 could not reproduce in a fresh Colab notebook with Python 3.10 and reminded that local inference needs the inference extras. Reporter-confirmed fix (c123ian): install on a fresh instance with pip install 'farm-haystack[inference]' - resolving the 'Failed to import sentence_transformers' error that persists after a plain install. Also check breaking changes of the installed release (v1.18.0 changed extras).

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_7-c59YZeFf1JmXfrgMrSQA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">issue with installation of haystack in colab after following all documentaion <span>— Vectle</span></a>