-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Open
Open
Copy link
Labels
bugSomething isn't workingSomething isn't workingpythonPull requests for the Python Semantic KernelPull requests for the Python Semantic Kernel
Description
Describe the bug
Cannot import AzureAIAgent from semantic_kernel.agents
>>> from semantic_kernel.agents import AzureAIAgent
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/venv/lib/python3.12/site-packages/semantic_kernel/agents/__init__.py", line 58, in __getattr__
module = importlib.import_module(submod_name, package=__name__)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/venv/lib/python3.12/site-packages/semantic_kernel/agents/azure_ai/azure_ai_agent.py", line 39, in <module>
from semantic_kernel.agents.azure_ai.agent_thread_actions import AgentThreadActions
File "/home/venv/lib/python3.12/site-packages/semantic_kernel/agents/azure_ai/agent_thread_actions.py", line 8, in <module>
from azure.ai.agents.models import (
ImportError: cannot import name 'RequiredMcpToolCall' from 'azure.ai.agents.models' (/home/venv/lib/python3.12/site-packages/azure/ai/agents/models/__init__.py). Did you mean: 'RequiredToolCall'?
>>>
KeyboardInterrupt
>>>
To Reproduce
Steps to reproduce the behavior:
- python3 -m venv venv
- source venv/bin/activate
- pip install azure-ai-agents
- pip install semantic-kernel
- python
- from semantic_kernel.agents import AzureAIAgent
Expected behavior
Expect this import to work
Screenshots
If applicable, add screenshots to help explain your problem.
Platform
- Language: Python
- Source: semantic-kernel==1.35.2, azure-ai-agents=1.1.0
- AI model: [e.g. OpenAI:GPT-4o-mini(2024-07-18)]
- IDE: terminal
- OS: wsl / Ubuntu 24.04
Additional context
If you reverse the install order (semantic-kernel first) its fine, but I don't think SK should take a dependency on pre-release packages, as it can cause issues if package installation is done out of order
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpythonPull requests for the Python Semantic KernelPull requests for the Python Semantic Kernel
Type
Projects
Status
No status