Install Instructor for Python¶
Instructor 1.18 requires Python 3.10 or later. If you're upgrading from 1.17 on Python 3.9, create an environment with a newer Python interpreter first.
Install the package¶
The base package includes Pydantic and the OpenAI SDK. For Claude, Gemini, or another provider, see provider SDKs and API keys.
Check the installed version¶
These commands import Instructor locally. You don't need an API key.
If Python can't find Instructor, check that your editor or notebook uses the same environment where you installed it.