-
Notifications
You must be signed in to change notification settings - Fork 829
Description
Describe your environment
Installing the latest opentelemetry-instrumentation on Ubuntu 18.04/20.04, with Python 3.10/3.11, then running opentelemetry-bootstrap results in a setuptools/pkg_resources error (see "actual behavior" below).
A workaround is to uninstall the latest version of setuptools and to install setuptools==65.7.0. There are breaking changes in setuptools==66.0.0 (released this week) such that non-conforming versions (as per PEP 440) may result in failures.
This did not happen when I tried Python 3.7, 3.8, 3.9. This may also have to do with installing Python 3.10/3.11 from deadsnakes, but I don't think there exists another way to install newer Python on these Ubuntu versions without switching default repo or manually downloading and installing (recent example guides here, here, here)
Steps to reproduce
I've posted a way to reproduce in Docker in this repo: https://github.com/tammy-baylis-swi/otel-python-bootstrap-invalidversion. The steps:
- Run a docker container based on an Ubuntu image, e.g.
ubuntu:20.04 - Install Python 3.10 as it does not come with the container. Note that if using apt-get another repo must be used (recent example guides here, here, here). The reproduce repo above manages this in sh.
- Install opentelemetry-instrumentation
- Run opentelemetry-bootstrap
What is the expected behavior?
No tracebacks/errors should happen when opentelemetry-bootstrap is called.
What is the actual behavior?
A traceback pops up with pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: '0.23ubuntu1'. I'll attach a text file with full example trace: