Skip to content

Unable to install the SDK #1639

@Ordoumpozanis

Description

@Ordoumpozanis

Describe the bug

whatever way i trie to install the lib i get the same error

python .\test.py
Traceback (most recent call last):
File "D:\Courses\mcp\OpenAI Agents SDK- Mcp\test.py", line 1, in
from agents import Agent, Runner
File "D:\Courses\mcp\OpenAI Agents SDK- Mcp.venv\Lib\site-packages\agents_init_.py", line 8, in
from .agent import (
File "D:\Courses\mcp\OpenAI Agents SDK- Mcp.venv\Lib\site-packages\agents\agent.py", line 18, in
from .mcp import MCPUtil
File "D:\Courses\mcp\OpenAI Agents SDK- Mcp.venv\Lib\site-packages\agents\mcp_init_.py", line 14, in
from .util import (
File "D:\Courses\mcp\OpenAI Agents SDK- Mcp.venv\Lib\site-packages\agents\mcp\util.py", line 13, in
from ..tool import FunctionTool, Tool
File "D:\Courses\mcp\OpenAI Agents SDK- Mcp.venv\Lib\site-packages\agents\tool.py", line 15, in
from openai.types.responses.tool import WebSearchToolFilters
ImportError: cannot import name 'WebSearchToolFilters' from 'openai.types.responses.tool' (D:\Courses\mcp\OpenAI Agents SDK- Mcp.venv\Lib\site-packages\openai\types\responses\tool.py)

#Install process [latest after many tries on different version of either pyton or the skd version**

uv init
uv venv --python 3.11 .venv
. ..venv\Scripts\Activate.ps1
uv pip install -U "openai>=1.103.0"
uv pip install "openai-agents @ git+https://github.com/openai/openai-agents-python@main"

**also tried the openai-agents directly **

python .\test.py

Debug information

  • Agents SDK version: (e.g. v0.0.3)
  • Python version (e.g. Python 3.10)

Repro steps

from agents import Agent, Runner

agent = Agent(name="Assistant", instructions="You are a helpful assistant")

result = Runner.run_sync(agent, "Write a haiku about recursion in programming.")
print(result.final_output)

Platform Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions