langfuse/langfuse-python

Missing `backoff` dependency

Closed this issue · 4 comments

backoff is missing when installing langfuse on a fresh environment.

sh-3.2$ python3 -m venv env
sh-3.2$ source env/bin/activate
(env) sh-3.2$ python3 -V
Python 3.11.4
(env) sh-3.2$ python3 -m pip install langfuse
Collecting langfuse
  Using cached langfuse-1.0.18-py3-none-any.whl (45 kB)
Collecting ... (skipping a few lines here)
Installing collected packages: pytz, urllib3, typing-extensions, tenacity, sniffio, six, PyYAML, packaging, numpy, mypy-extensions, multidict, idna, h11, frozenlist, charset-normalizer, certifi, attrs, async-timeout, yarl, typing-inspect, SQLAlchemy, requests, python-dateutil, pydantic, numexpr, marshmallow, anyio, aiosignal, langsmith, httpcore, dataclasses-json, aiohttp, langchain, httpx, langfuse
Successfully installed PyYAML-6.0.1 SQLAlchemy-2.0.20 aiohttp-3.8.5 aiosignal-1.3.1 anyio-4.0.0 async-timeout-4.0.3 attrs-23.1.0 certifi-2023.7.22 charset-normalizer-3.2.0 dataclasses-json-0.5.14 frozenlist-1.4.0 h11-0.14.0 httpcore-0.17.3 httpx-0.24.1 idna-3.4 langchain-0.0.286 langfuse-1.0.18 langsmith-0.0.35 marshmallow-3.20.1 multidict-6.0.4 mypy-extensions-1.0.0 numexpr-2.8.6 numpy-1.25.2 packaging-23.1 pydantic-1.10.12 python-dateutil-2.8.2 pytz-2023.3.post1 requests-2.31.0 six-1.16.0 sniffio-1.3.0 tenacity-8.2.3 typing-extensions-4.7.1 typing-inspect-0.9.0 urllib3-2.0.4 yarl-1.9.2
(env) sh-3.2$ python3 -c "from langfuse.model import CreateTrace"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/alex/env/lib/python3.11/site-packages/langfuse/__init__.py", line 1, in <module>
    from .client import Langfuse
  File "/Users/alex/env/lib/python3.11/site-packages/langfuse/client.py", line 28, in <module>
    from langfuse.task_manager import TaskManager
  File "/Users/alex/env/lib/python3.11/site-packages/langfuse/task_manager.py", line 8, in <module>
    import backoff
ModuleNotFoundError: No module named 'backoff'
(env) sh-3.2$ python3 -m pip install backoff
Collecting backoff
  Using cached backoff-2.2.1-py3-none-any.whl (15 kB)
Installing collected packages: backoff
Successfully installed backoff-2.2.1
(env) sh-3.2$ python3 -c "from langfuse.model import CreateTrace"
(env) sh-3.2$

@alexcannan thanks for raising this. Will fix this asap.

Version 1.0.19 contains this fix: c31a60b

Can you check it works on your end?

@maxdeichmann I can confirm the issue subsides when installing 1.0.19. Thanks for the quick response!

Awesome, closing this