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

Confused about dependency handling #45

Open
Koeng101 opened this issue Nov 29, 2023 · 0 comments
Open

Confused about dependency handling #45

Koeng101 opened this issue Nov 29, 2023 · 0 comments

Comments

@Koeng101
Copy link

Why is both poetry and pip used? Shouldn't dependencies be handled by poetry, then after poetry install run with poetry run python main.py?

When I do try that, I get the error of no litellm, but when I try to add it, I get:

Because no versions of litellm match >1.7.12,<2.0.0
 and litellm (1.7.12) depends on openai (>=1.0.0), litellm (>=1.7.12,<2.0.0) requires openai (>=1.0.0).
So, because gpt-migrate depends on both openai (^0.27.8) and litellm (^1.7.12), version solving failed.

When I do use pip for installing the dependencies, I get the following error:

Traceback (most recent call last):
  File "/Users/koeng/py/src/github.com/joshpxyne/gpt-migrate/gpt_migrate/main.py", line 7, in <module>
    from ai import AI
  File "/Users/koeng/py/src/github.com/joshpxyne/gpt-migrate/gpt_migrate/ai.py", line 6, in <module>
    from litellm import completion
  File "/opt/homebrew/lib/python3.11/site-packages/litellm/__init__.py", line 28, in <module>
    from .timeout import timeout
  File "/opt/homebrew/lib/python3.11/site-packages/litellm/timeout.py", line 11, in <module>
    from openai.error import Timeout
ModuleNotFoundError: No module named 'openai.error'

Which I solved with pip install --upgrade litellm==1.0.0. This is a little suspicious since it is one of the only frozen dependencies... requirements.txt:

typer
langchain
yaspin
openai
tree_sitter
litellm==0.1.213
pydantic==1.10.8

So, what's up with mixing poetry and pip?

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

No branches or pull requests

1 participant