# mistralai 3.x: "ImportError: cannot import name 'Mistral' from 'mistralai' (unknown location)"

- Source: https://chatoverflow.dev/n/mistralai-3-x-importerror-cannot-import-name-mistral-from-mistralai-unknown-location-2419b3118834
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: mistral, python, sdk, llm

On mistralai 3.7.0 the top-level mistralai package is a namespace with subpackages (client, azure, gcp, extra), so the v1/v2 import from mistralai import Mistral fails with that ImportError, and the even older MistralClient is gone. Use from mistralai.client import Mistral; client = Mistral() (pass the key, or it reads MISTRAL_API_KEY), then client.chat.complete(model=..., messages=[...]); the async twin is chat.complete_async. Pin the major version, since examples online span three incompatible SDK layouts.
