microsoft / autogen

A programming framework for agentic AI. Discord: https://aka.ms/autogen-dc. Roadmap: https://aka.ms/autogen-roadmap
https://microsoft.github.io/autogen/
Creative Commons Attribution 4.0 International
28.02k stars 4.09k forks source link

[Bug]: Missing packaging module #2783

Open cakriwut opened 1 month ago

cakriwut commented 1 month ago

Describe the bug

I follow the installation instruction by running pip install autogenstudio then followed by autogenstudio ui. The UI does not launch with error complains missing packaging module.

Resolution Run pip install packaging

Steps to reproduce

  1. conda activate autogenstudio
  2. export AZURE_OPENAI_API_KEY=xxx
  3. pip install autogenstudio
  4. autogenstudio ui

Model Used

gpt-4

Expected Behavior

Server should start

Screenshots and logs

No response

Additional Information

No response

aaroneden commented 1 month ago

I'm experiencing this as well. Full error:

Traceback (most recent call last): File "/home/autogen/.local/bin/autogenstudio", line 5, in from autogenstudio.cli import run File "/home/autogen/.local/lib/python3.11/site-packages/autogenstudio/init.py", line 1, in from .chatmanager import File "/home/autogen/.local/lib/python3.11/site-packages/autogenstudio/chatmanager.py", line 11, in from .utils import extract_successful_code_blocks, get_modified_files, summarize_chat_history File "/home/autogen/.local/lib/python3.11/site-packages/autogenstudio/utils/init.py", line 2, in from .utils import File "/home/autogen/.local/lib/python3.11/site-packages/autogenstudio/utils/utils.py", line 8, in import autogen File "/home/autogen/.local/lib/python3.11/site-packages/autogen/init.py", line 3, in from .agentchat import * File "/home/autogen/.local/lib/python3.11/site-packages/autogen/agentchat/init.py", line 2, in from .assistant_agent import AssistantAgent File "/home/autogen/.local/lib/python3.11/site-packages/autogen/agentchat/assistant_agent.py", line 5, in from .conversable_agent import ConversableAgent File "/home/autogen/.local/lib/python3.11/site-packages/autogen/agentchat/conversable_agent.py", line 19, in from ..code_utils import ( File "/home/autogen/.local/lib/python3.11/site-packages/autogen/code_utils.py", line 15, in from autogen import oai File "/home/autogen/.local/lib/python3.11/site-packages/autogen/oai/init.py", line 2, in from autogen.oai.client import ModelClient, OpenAIWrapper File "/home/autogen/.local/lib/python3.11/site-packages/autogen/oai/client.py", line 15, in from autogen.oai.openai_utils import OAI_PRICE1K, get_key, is_valid_api_key File "/home/autogen/.local/lib/python3.11/site-packages/autogen/oai/openai_utils.py", line 14, in from packaging.version import parse ModuleNotFoundError: No module named 'packaging'

joshuatownsend commented 1 month ago

Does your conda environment match the required python version? If not, install the version of miniconda corresponding to Python 3.11 (https://docs.anaconda.com/free/miniconda/miniconda-other-installer-links/) and try again.