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

opentelemetry.instrumentation.langchain failed pip install with promptflow #3844

Open
yeamusic21 opened this issue Nov 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@yeamusic21
Copy link

yeamusic21 commented Nov 6, 2024

Describe the bug
Creating local Python 3.12.5 virtual env on Windows 11 machine and installing packages needed for prompt flow tracing, I'm getting error for pip install opentelemetry-instrumentation-langchain.

How To Reproduce the bug

Step1: Create virtual venv on Windows 11

C:\Users\LocationFor\Python312\python -m venv PrmptFlPyVenv

Step2: Initialize venv

cd PrmptFlPyVenv
.\scripts\activate
cd ..

Step3: Run pip installs

pip install promptflow
pip install promptflow-tools
pip install promptflow-tracing
pip install python-dotenv
pip install langchain
pip install langchain_openai
pip install opentelemetry-instrumentation-langchain

ERROR MESSAGE RETURNED

Installing collected packages: setuptools, opentelemetry-semantic-conventions-ai, importlib-metadata, opentelemetry-api, opentelemetry-semantic-conventions, opentelemetry-instrumentation, opentelemetry-instrumentation-langchain
Attempting uninstall: importlib-metadata
Found existing installation: importlib_metadata 8.5.0
Uninstalling importlib_metadata-8.5.0:
Successfully uninstalled importlib_metadata-8.5.0
Attempting uninstall: opentelemetry-api
Found existing installation: opentelemetry-api 1.28.0
Uninstalling opentelemetry-api-1.28.0:
Successfully uninstalled opentelemetry-api-1.28.0
Attempting uninstall: opentelemetry-semantic-conventions
ages that are installed. This behaviour is the source of the following dependency conflicts.
opentelemetry-sdk 1.28.0 requires opentelemetry-api==1.28.0, but you have opentelemetry-api 1.27.0 which is incompatible.
opentelemetry-sdk 1.28.0 requires opentelemetry-semantic-conventions==0.49b0, but you have opentelemetry-semantic-conventions 0.48b0 which is incompatible.

Expected behavior
Clean pip install for opentelemetry-instrumentation-langchain when run after promptflow installs

Screenshots
N/A

Running Information(please complete the following information):

  • Promptflow Package Version: promptflow==1.16.1
  • Operating System: Windows 11
  • Python Version: 3.12.5

Additional context
pip freeze returns the following...

aiohappyeyeballs==2.4.3
aiohttp==3.10.10
aiosignal==1.3.1
aniso8601==9.0.1
annotated-types==0.7.0
anyio==4.6.2.post1
argcomplete==3.5.1
attrs==24.2.0
azure-core==1.32.0
azure-monitor-opentelemetry-exporter==1.0.0b32
blinker==1.8.2
certifi==2024.8.30
cffi==1.17.1
charset-normalizer==3.4.0
click==8.1.7
colorama==0.4.6
cryptography==43.0.3
Deprecated==1.2.14
distro==1.9.0
docstring_parser==0.16
fastapi==0.115.4
filelock==3.16.1
filetype==1.2.0
fixedint==0.1.6
Flask==3.0.3
Flask-Cors==4.0.2
flask-restx==1.3.0
frozenlist==1.5.0
gitdb==4.0.11
GitPython==3.1.43
google_search_results==2.4.1
googleapis-common-protos==1.65.0
greenlet==3.1.1
h11==0.14.0
httpcore==1.0.6
httpx==0.27.2
idna==3.10
importlib_metadata==8.4.0
importlib_resources==6.4.5
isodate==0.7.2
itsdangerous==2.2.0
jaraco.classes==3.4.0
Jinja2==3.1.4
jiter==0.7.0
jsonpatch==1.33
jsonpointer==3.0.0
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
keyring==24.3.1
langchain==0.3.7
langchain-core==0.3.15
langchain-openai==0.2.6
langchain-text-splitters==0.3.2
langsmith==0.1.140
MarkupSafe==3.0.2
marshmallow==3.23.1
more-itertools==10.5.0
msrest==0.7.1
multidict==6.1.0
numpy==1.26.4
oauthlib==3.2.2
openai==1.54.2
opentelemetry-api==1.27.0
opentelemetry-exporter-otlp-proto-common==1.28.0
opentelemetry-exporter-otlp-proto-http==1.28.0
opentelemetry-instrumentation==0.48b0
opentelemetry-instrumentation-langchain==0.33.9
opentelemetry-proto==1.28.0
opentelemetry-sdk==1.28.0
opentelemetry-semantic-conventions==0.48b0
opentelemetry-semantic-conventions-ai==0.4.2
orjson==3.10.11
packaging==24.1
pandas==2.2.3
pillow==10.4.0
promptflow==1.16.1
promptflow-core==1.16.1
promptflow-devkit==1.16.1
promptflow-tools==1.4.0
promptflow-tracing==1.16.1
propcache==0.2.0
protobuf==5.28.3
psutil==5.9.8
pycparser==2.22
pydantic==2.9.2
pydantic_core==2.23.4
pydash==7.0.7
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
pytz==2024.2
pywin32==308
pywin32-ctypes==0.2.3
PyYAML==6.0.2
referencing==0.35.1
regex==2024.9.11
requests==2.32.3
requests-oauthlib==2.0.0
requests-toolbelt==1.0.0
rpds-py==0.21.0
ruamel.yaml==0.18.6
ruamel.yaml.clib==0.2.12
setuptools==75.3.0
six==1.16.0
smmap==5.0.1
sniffio==1.3.1
SQLAlchemy==2.0.36
starlette==0.41.2
strictyaml==1.7.3
tabulate==0.9.0
tenacity==9.0.0
tiktoken==0.8.0
tqdm==4.67.0
typing_extensions==4.12.2
tzdata==2024.2
urllib3==2.2.3
waitress==2.1.2
Werkzeug==3.1.2
wrapt==1.16.0
yarl==1.17.1
zipp==3.20.2

During the final pip install opentelemetry-instrumentation-langchain, the following is returned...

Collecting opentelemetry-instrumentation-langchain
Using cached opentelemetry_instrumentation_langchain-0.33.9-py3-none-any.whl.metadata (2.3 kB)
Requirement already satisfied: opentelemetry-api<2.0.0,>=1.27.0 in d:\mjy\github\promptflowsandbox\prmptflpyvenv\lib\site-packages (from opentelemetry-instrumentation-langchain) (1.28.0)
Collecting opentelemetry-instrumentation<0.49,>=0.48b0 (from opentelemetry-instrumentation-langchain)
Using cached opentelemetry_instrumentation-0.48b0-py3-none-any.whl.metadata (6.1 kB)
Collecting opentelemetry-semantic-conventions<0.49,>=0.48b0 (from opentelemetry-instrumentation-langchain)
Using cached opentelemetry_semantic_conventions-0.48b0-py3-none-any.whl.metadata (2.4 kB)
Collecting opentelemetry-semantic-conventions-ai==0.4.2 (from opentelemetry-instrumentation-langchain)
Using cached opentelemetry_semantic_conventions_ai-0.4.2-py3-none-any.whl.metadata (1.1 kB)
Requirement already satisfied: deprecated>=1.2.6 in d:\mjy\github\promptflowsandbox\prmptflpyvenv\lib\site-packages (from opentelemetry-api<2.0.0,>=1.27.0->opentelemetry-instrumentation-langchain) (1.2.14)
Requirement already satisfied: importlib-metadata<=8.5.0,>=6.0 in d:\mjy\github\promptflowsandbox\prmptflpyvenv\lib\site-packages (from opentelemetry-api<2.0.0,>=1.27.0->opentelemetry-instrumentation-langchain) (8.5.0)
Collecting setuptools>=16.0 (from opentelemetry-instrumentation<0.49,>=0.48b0->opentelemetry-instrumentation-langchain)
Using cached setuptools-75.3.0-py3-none-any.whl.metadata (6.9 kB)
Requirement already satisfied: wrapt<2.0.0,>=1.0.0 in d:\mjy\github\promptflowsandbox\prmptflpyvenv\lib\site-packages (from opentelemetry-instrumentation<0.49,>=0.48b0->opentelemetry-instrumentation-langchain) (1.16.0)
Collecting opentelemetry-api<2.0.0,>=1.27.0 (from opentelemetry-instrumentation-langchain)
Using cached opentelemetry_api-1.27.0-py3-none-any.whl.metadata (1.4 kB)
Collecting importlib-metadata<=8.4.0,>=6.0 (from opentelemetry-api<2.0.0,>=1.27.0->opentelemetry-instrumentation-langchain)
Using cached importlib_metadata-8.4.0-py3-none-any.whl.metadata (4.7 kB)
Requirement already satisfied: zipp>=0.5 in d:\mjy\github\promptflowsandbox\prmptflpyvenv\lib\site-packages (from importlib-metadata<=8.4.0,>=6.0->opentelemetry-api<2.0.0,>=1.27.0->opentelemetry-instrumentation-langchain) (3.20.2)
Using cached opentelemetry_instrumentation_langchain-0.33.9-py3-none-any.whl (9.7 kB)
Using cached opentelemetry_semantic_conventions_ai-0.4.2-py3-none-any.whl (5.3 kB)
Using cached opentelemetry_instrumentation-0.48b0-py3-none-any.whl (29 kB)
Using cached opentelemetry_semantic_conventions-0.48b0-py3-none-any.whl (149 kB)
Using cached opentelemetry_api-1.27.0-py3-none-any.whl (63 kB)
Using cached importlib_metadata-8.4.0-py3-none-any.whl (26 kB)
Using cached setuptools-75.3.0-py3-none-any.whl (1.3 MB)
Installing collected packages: setuptools, opentelemetry-semantic-conventions-ai, importlib-metadata, opentelemetry-api, opentelemetry-semantic-conventions, opentelemetry-instrumentation, opentelemetry-instrumentation-langchain
Attempting uninstall: importlib-metadata
Found existing installation: importlib_metadata 8.5.0
Uninstalling importlib_metadata-8.5.0:
Successfully uninstalled importlib_metadata-8.5.0
Attempting uninstall: opentelemetry-api
Found existing installation: opentelemetry-api 1.28.0
Uninstalling opentelemetry-api-1.28.0:
Successfully uninstalled opentelemetry-api-1.28.0
Attempting uninstall: opentelemetry-semantic-conventions
ages that are installed. This behaviour is the source of the following dependency conflicts.
opentelemetry-sdk 1.28.0 requires opentelemetry-api==1.28.0, but you have opentelemetry-api 1.27.0 which is incompatible.
opentelemetry-sdk 1.28.0 requires opentelemetry-semantic-conventions==0.49b0, but you have opentelemetry-semantic-conventions 0.48b0 which is incompatible.
Successfully installed importlib-metadata-8.4.0 opentelemetry-api-1.27.0 opentelemetry-instrumentation-0.48b0 opentelemetry-instrumentation-langchain-0.33.9 opentelemetry-semantic-conventions-0.48b0 opentelemetry-semantic-conventions-ai-0.4.2 setuptools-75.3.0

@yeamusic21 yeamusic21 added the bug Something isn't working label Nov 6, 2024
@yeamusic21
Copy link
Author

Same error with Python 3.10.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant