Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix] add termcolor dep #65

Merged
merged 1 commit into from
Dec 19, 2024
Merged

[bugfix] add termcolor dep #65

merged 1 commit into from
Dec 19, 2024

Conversation

yanxi0830
Copy link
Contributor

@yanxi0830 yanxi0830 commented Dec 19, 2024

Fix issue w/ just installing llama-stack-client only w/o llama-stack.

$ llama-stack-client configure
Traceback (most recent call last):
  File "/Users/rsm/miniforge3/bin/llama-stack-client", line 5, in <module>
    from llama_stack_client.lib.cli.llama_stack_client import main
  File "/Users/rsm/miniforge3/lib/python3.12/site-packages/llama_stack_client/lib/cli/llama_stack_client.py", line 19, in <module>
    from .inference import inference
  File "/Users/rsm/miniforge3/lib/python3.12/site-packages/llama_stack_client/lib/cli/inference/__init__.py", line 7, in <module>
    from .inference import inference
  File "/Users/rsm/miniforge3/lib/python3.12/site-packages/llama_stack_client/lib/cli/inference/inference.py", line 13, in <module>
    from ...inference.event_logger import EventLogger
  File "/Users/rsm/miniforge3/lib/python3.12/site-packages/llama_stack_client/lib/inference/event_logger.py", line 6, in <module>
    from termcolor import cprint
ModuleNotFoundError: No module named 'termcolor'
  • Sync requirements files via:
rye sync

After Fix

conda create -n fresh python=3.11
cd llama-stack-client-python
pip install -e .
llama-stack-client configure --endpoint http://localhost:5000
image

@yanxi0830 yanxi0830 marked this pull request as ready for review December 19, 2024 06:53
@yanxi0830 yanxi0830 merged commit 0ea2d28 into main Dec 19, 2024
3 checks passed
@yanxi0830 yanxi0830 deleted the fix_termcolor_import branch December 19, 2024 06:55
@sarthakgupta072
Copy link

Hey @yanxi0830 , was a release made for this fix?

I am still facing this issue

(.venv) sarthak@Sarthaks-MacBook-Air llama-stack % python first-rag-agent.py     
Traceback (most recent call last):
  File "/Users/sarthak/projects/llama-stack/first-rag-agent.py", line 6, in <module>
    from llama_stack_client.lib.agents.event_logger import EventLogger
  File "/Users/sarthak/projects/llama-stack/.venv/lib/python3.12/site-packages/llama_stack_client/lib/agents/event_logger.py", line 9, in <module>
    from termcolor import cprint
ModuleNotFoundError: No module named 'termcolor'

Python version - Python 3.12.8
Pip version - pip 24.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants