Open vipervs opened 1 year ago
What's langchain
version in your venv? Looks like this is a dependency issue.
BTW you don't need --platform linux/amd64
when running in local.
somehow the problem changed:
(venv_pdfGPT) ~/pdfGPT/ [main*] lc-serve deploy local api
Traceback (most recent call last):
File "/opt/homebrew/bin/lc-serve", line 5, in
(venv_pdfGPT) ~/pdfGPT/ [main] pip show langchain
Name: langchain
Version: 0.0.275
Summary: Building applications with LLMs through composability
Home-page: https://github.com/langchain-ai/langchain
Author:
Author-email:
License: MIT
Location: /Users/andi/pdfGPT/venv_pdfGPT/lib/python3.11/site-packages
Requires: aiohttp, dataclasses-json, langsmith, numexpr, numpy, pydantic, PyYAML, requests, SQLAlchemy, tenacity
Required-by: langchain-serve
(venv_pdfGPT) ~/pdfGPT/ [main] pip show langchain-serve
Name: langchain-serve
Version: 0.0.61
Summary: Langchain Serve - serve your langchain apps on Jina AI Cloud.
Home-page: https://github.com/jina-ai/langchain-serve/
Author: Jina AI
Author-email: hello@jina.ai
License: Apache 2.0
Location: /Users/andi/pdfGPT/venv_pdfGPT/lib/python3.11/site-packages
Requires: click, jcloud, jina, jina-hubble-sdk, langchain, nest-asyncio, requests, slack-bolt, textual, toml
Required-by:
(venv_pdfGPT) ~/pdfGPT/ [main*] pip show fastapi
pip show pydantic
Name: fastapi
Version: 0.103.0
Summary: FastAPI framework, high performance, easy to learn, fast to code, ready for production
Home-page:
Author:
Author-email: Sebastián Ramírez tiangolo@gmail.com
License:
Location: /Users/andi/pdfGPT/venv_pdfGPT/lib/python3.11/site-packages
Requires: pydantic, starlette, typing-extensions
Required-by: gradio, jina
Name: pydantic
Version: 2.3.0
Summary: Data validation using Python type hints
Home-page:
Author:
Author-email: Samuel Colvin s@muelcolvin.com, Eric Jolibois em.jolibois@gmail.com, Hasan Ramezani hasan.r67@gmail.com, Adrian Garcia Badaracco 1755071+adriangb@users.noreply.github.com, Terrence Dorsey terry@pydantic.dev, David Montague david@pydantic.dev
License:
Location: /Users/andi/pdfGPT/venv_pdfGPT/lib/python3.11/site-packages
Requires: annotated-types, pydantic-core, typing-extensions
Required-by: fastapi, gradio, jina, langchain, langsmith
hmm I thought the lc-serve
should be from venv_pdfGPT
(/Users/andi/pdfGPT/venv_pdfGPT/bin/lc-serve
), not /opt/homebrew/bin/lc-serve
s?
trying on a MacBook M2
(venv_pdfGPT) ~/pdfGPT/ [main] lc-serve deploy local api --platform linux/amd64 Traceback (most recent call last): File "/opt/homebrew/bin/lc-serve", line 5, in
from lcserve.main import serve
File "/opt/homebrew/lib/python3.11/site-packages/lcserve/init.py", line 16, in
from .backend.slackbot import SlackBot
File "/opt/homebrew/lib/python3.11/site-packages/lcserve/backend/slackbot/init.py", line 1, in
from .slackbot import SlackBot
File "/opt/homebrew/lib/python3.11/site-packages/lcserve/backend/slackbot/slackbot.py", line 24, in
from langchain.tools import StructuredTool
ImportError: cannot import name 'StructuredTool' from 'langchain.tools' (/Users/andi/Library/Python/3.11/lib/python/site-packages/langchain/tools/init.py)
(venv_pdfGPT) ~/pdfGPT/ [main ] lc-serve deploy local api
from lcserve.main import serve
File "/opt/homebrew/lib/python3.11/site-packages/lcserve/init.py", line 16, in
from .backend.slackbot import SlackBot
File "/opt/homebrew/lib/python3.11/site-packages/lcserve/backend/slackbot/init.py", line 1, in
from .slackbot import SlackBot
File "/opt/homebrew/lib/python3.11/site-packages/lcserve/backend/slackbot/slackbot.py", line 24, in
from langchain.tools import StructuredTool
ImportError: cannot import name 'StructuredTool' from 'langchain.tools' (/Users/andi/Library/Python/3.11/lib/python/site-packages/langchain/tools/init.py)
Traceback (most recent call last): File "/opt/homebrew/bin/lc-serve", line 5, in