OpenSfM
OpenSfM copied to clipboard
Problems building OpenSfM with Python3.10
I tried to build OpenSfM with Python3.10 on Ubuntu 22.04 but I got the following error, which is releated to https://github.com/sphinx-doc/sphinx/issues/9562: Traceback (most recent call last):
File "/home/jonas/projects/OpenSfM/setup.py", line 9, in <module>
from sphinx.setup_command import BuildDoc
File "/home/jonas/.local/lib/python3.10/site-packages/sphinx/setup_command.py", line 21, in <module>
from sphinx.application import Sphinx
File "/home/jonas/.local/lib/python3.10/site-packages/sphinx/application.py", line 31, in <module>
from sphinx.config import Config
File "/home/jonas/.local/lib/python3.10/site-packages/sphinx/config.py", line 21, in <module>
from sphinx.util import logging
File "/home/jonas/.local/lib/python3.10/site-packages/sphinx/util/__init__.py", line 41, in <module>
from sphinx.util.typing import PathMatcher
File "/home/jonas/.local/lib/python3.10/site-packages/sphinx/util/typing.py", line 37, in <module>
from types import Union as types_Union
ImportError: cannot import name 'Union' from 'types' (/usr/lib/python3.10/types.py)
Changing sphinx version to 4.2.0 helped to resolve this issue
Closed in https://github.com/mapillary/OpenSfM/pull/908