Hi,
I’m trying to follow this guide to import text annotations using the Python SDK but I’m getting the following error when executing import labelbox.types as lb_types
:
Traceback (most recent call last):
File "/workspaces/ml-automarking-modelbuild/.venv/lib/python3.9/site-packages/labelbox/types.py", line 2, in <module>
from labelbox.data.annotation_types import *
File "/workspaces/ml-automarking-modelbuild/.venv/lib/python3.9/site-packages/labelbox/data/annotation_types/__init__.py", line 1, in <module>
from .geometry import Line
File "/workspaces/ml-automarking-modelbuild/.venv/lib/python3.9/site-packages/labelbox/data/annotation_types/geometry/__init__.py", line 1, in <module>
from .line import Line
File "/workspaces/ml-automarking-modelbuild/.venv/lib/python3.9/site-packages/labelbox/data/annotation_types/geometry/line.py", line 3, in <module>
import geojson
ModuleNotFoundError: No module named 'geojson'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/workspaces/ml-automarking-modelbuild/.venv/lib/python3.9/site-packages/labelbox/types.py", line 4, in <module>
raise ImportError(
ImportError: There are missing dependencies for `labelbox.types`, use `pip install labelbox[data] --upgrade` to install missing dependencies.
After executing pip install labelbox[data] --upgrade
, I then get a different error:
Traceback (most recent call last):
File "/workspaces/ml-automarking-modelbuild/.venv/lib/python3.9/site-packages/labelbox/types.py", line 2, in <module>
from labelbox.data.annotation_types import *
File "/workspaces/ml-automarking-modelbuild/.venv/lib/python3.9/site-packages/labelbox/data/annotation_types/__init__.py", line 1, in <module>
from .geometry import Line
File "/workspaces/ml-automarking-modelbuild/.venv/lib/python3.9/site-packages/labelbox/data/annotation_types/geometry/__init__.py", line 1, in <module>
from .line import Line
File "/workspaces/ml-automarking-modelbuild/.venv/lib/python3.9/site-packages/labelbox/data/annotation_types/geometry/line.py", line 5, in <module>
import cv2
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/workspaces/ml-automarking-modelbuild/.venv/lib/python3.9/site-packages/labelbox/types.py", line 4, in <module>
raise ImportError(
ImportError: There are missing dependencies for `labelbox.types`, use `pip install labelbox[data] --upgrade` to install missing dependencies.
I’m using a GitHub codespace and the following Python 3.9.17
docker image mcr.microsoft.com/devcontainers/python:3.9
and developing within a virtual env with no packages installed other than labelbox