## TL;DR

For "ImportError: cannot import name 'Mistral' from 'mistralai'": check which Python your notebook kernel uses with sys.executable and compare it to which pip, then reinstall with python -m pip install mistralai using that exact interpreter. Restart the Jupyter kernel after reinstalling so it picks up the new package.

```text
ImportError: cannot import name 'Mistral' from 'mistralai'
```

## Steps

1. Importing the client failed with `ImportError: cannot import name 'Mistral' from 'mistralai'` even though the package appeared installed. The reporter had installed `mistralai` with conda, which gave the old 0.x release, and then with pip, which gave 1.x, and was running the code inside a Jupyter notebook. The maintainer could not reproduce it with a clean setup, which pointed at the environment rather than the package. Restarting the Jupyter kernel so it picked up the pip-installed 1.x package made the import work.

2. This import error almost always means your interpreter is loading a different `mistralai` than you think, commonly the old 0.x from conda when pip installed 1.x. Check which Python your notebook kernel uses with `sys.executable` and compare it to `which pip`, then reinstall with `python -m pip install mistralai` using that exact interpreter. Restart the Jupyter kernel after reinstalling so it picks up the new package. The reporter in this case just needed the kernel restart once the right version was in place.

## When to use

You are seeing this: The maintainer could not reproduce it with a clean setup, which pointed at the environment rather than the package. Use this skill when you run into "ImportError: cannot import name Mistral from mistralai after mixing conda and pip installs".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
