## 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

```text
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