AcademySoftwareFoundation / OpenTimelineIO

Open Source API and interchange format for editorial timeline information.
http://opentimeline.io
Apache License 2.0
1.47k stars 293 forks source link

Python 3.9 Support #828

Closed reinecke closed 3 years ago

reinecke commented 4 years ago

There currently exists a rare crash condition that can occur with the combination of python 3.9.0 and pybind11 (for context see this ASWF thread or this pybind11 issue.

The tl;dr: There could be unexpected and unpredictable crashing in Python 3.9.0, this issue is set to be addressed in 3.9.1. After 3.9.1 is released we should enable CI for 3.9 and consider adding 3.9 to the badge in the readme.

We may also consider updating the python_requires to exclude 3.9.0, though we'd want to make sure we can do this in a way that signals to users why this is and steps to remedy (use 3.9.1 instead).

ssteinbach commented 3 years ago

It looks like 3.9.1 is released: https://www.python.org/downloads/release/python-391/

I'm not sure about how the python_requires works, but I know we do some manual checks at the top of the setup.py to guard against ancient pip/setuptools versions.

ssteinbach commented 3 years ago

Note that there are a bunch of build warnings we'll need to tackle in 3.9:

src/deps/pybind11/include/pybind11/detail/internals.h:200:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
        PyEval_InitThreads();
        ^
meshula commented 3 years ago

That looks like motivation to get pybind11 updated

ssteinbach commented 3 years ago

yeah, hoping that addresses this issue. Note that pybind11 is also seeing some weird CI failure: #874

Tilix4 commented 3 years ago

I don't know if it's completely relevant, but I've tried both the current master and the reinecke's feature/wheel-builds branch with Python3.9 and I get this error when importing:

>>> import opentimelineio
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Felix\AppData\Local\Programs\Python\Python39\lib\site-packages\opentimelineio\__init__.py", line 35, in <module>
    from . import (
  File "C:\Users\Felix\AppData\Local\Programs\Python\Python39\lib\site-packages\opentimelineio\exceptions.py", line 26, in <module>
    from . _otio import ( # noqa
ImportError: DLL load failed while importing _otio: A dynamic link library (DLL) initialization routine failed.

The funny thing is, I only get this error on my personal windows computer.

On my OSX and Windows at work, I get:

>>> import opentimeline
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'opentimeline'
>>> import opentimelineio
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\fdavid\Downloads\blender-2.93.0-stable+blender-v293-release.84da05a8b806-windows.amd64-release\blender-windows64\2.93\python\lib\site-packages\opentimelineio\__init__.py", line 35, in <module>
    from . import (
  File "C:\Users\fdavid\Downloads\blender-2.93.0-stable+blender-v293-release.84da05a8b806-windows.amd64-release\blender-windows64\2.93\python\lib\site-packages\opentimelineio\opentime.py", line 1, in <module>
    from . _opentime import ( # noqa
ModuleNotFoundError: No module named 'opentimelineio._opentime'

I've tried to investigate, without any success until now...

Everything works fine on Python<3.9

Tilix4 commented 3 years ago

After some new experimentation, it seems no any opentimelineio version work on Python3.9, they all raise the ModuleNotFoundError: No module named 'opentimelineio._opentime' error.

vdtoorn commented 3 years ago

I get the same error on python 3.8

meshula commented 3 years ago

Separating out mac and windows for a second, is it possible we are being hit, on Windows, with the new platform specific dll search behavior? https://docs.python.org/3/library/os.html#os.add_dll_directory

If the _opentime.dll and .pyd files are in the same directory as the init.py that invokes them, could you try adding a call to add_dll_directory to init.py before the line of code that imports _opentime?

Perhaps we can come back to the mac after the issue with the windows wheel is resolved.

Tilix4 commented 3 years ago

Some inputs about that: I'm trying to install OTIO into Blender 2.93's Python, which uses python 3.9.2. Tested on MacOS and windows.

It doesn't work and I get this error:

Building wheel for OpenTimelineIO (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/felixdavid/Documents/Logiciels/OpenTimelineIO/.venv/bin/python3.9 /Users/felixdavid/Documents/Logiciels/OpenTimelineIO/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/dh/48hvyv0d6gz4rx23cq8xxy940000gn/T/tmp248844cl
       cwd: /private/var/folders/dh/48hvyv0d6gz4rx23cq8xxy940000gn/T/pip-req-build-01nxgvld
  Complete output (198 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.13-x86_64-3.9
  creating build/lib.macosx-10.13-x86_64-3.9/opentimelineio
  copying src/py-opentimelineio/opentimelineio/test_utils.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio
  copying src/py-opentimelineio/opentimelineio/opentime.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio
  copying src/py-opentimelineio/opentimelineio/hooks.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio
  copying src/py-opentimelineio/opentimelineio/__init__.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio
  copying src/py-opentimelineio/opentimelineio/media_linker.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio
  copying src/py-opentimelineio/opentimelineio/exceptions.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio
  copying src/py-opentimelineio/opentimelineio/url_utils.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio
  creating build/lib.macosx-10.13-x86_64-3.9/opentimelineio/core
  copying src/py-opentimelineio/opentimelineio/core/_core_utils.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/core
  copying src/py-opentimelineio/opentimelineio/core/__init__.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/core
  copying src/py-opentimelineio/opentimelineio/core/mediaReference.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/core
  copying src/py-opentimelineio/opentimelineio/core/composable.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/core
  copying src/py-opentimelineio/opentimelineio/core/composition.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/core
  copying src/py-opentimelineio/opentimelineio/core/item.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/core
  creating build/lib.macosx-10.13-x86_64-3.9/opentimelineio/plugins
  copying src/py-opentimelineio/opentimelineio/plugins/manifest.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/plugins
  copying src/py-opentimelineio/opentimelineio/plugins/__init__.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/plugins
  copying src/py-opentimelineio/opentimelineio/plugins/python_plugin.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/plugins
  creating build/lib.macosx-10.13-x86_64-3.9/opentimelineio/algorithms
  copying src/py-opentimelineio/opentimelineio/algorithms/track_algo.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/algorithms
  copying src/py-opentimelineio/opentimelineio/algorithms/stack_algo.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/algorithms
  copying src/py-opentimelineio/opentimelineio/algorithms/timeline_algo.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/algorithms
  copying src/py-opentimelineio/opentimelineio/algorithms/__init__.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/algorithms
  copying src/py-opentimelineio/opentimelineio/algorithms/filter.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/algorithms
  creating build/lib.macosx-10.13-x86_64-3.9/opentimelineio/adapters
  copying src/py-opentimelineio/opentimelineio/adapters/otioz.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/adapters
  copying src/py-opentimelineio/opentimelineio/adapters/file_bundle_utils.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/adapters
  copying src/py-opentimelineio/opentimelineio/adapters/otio_json.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/adapters
  copying src/py-opentimelineio/opentimelineio/adapters/adapter.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/adapters
  copying src/py-opentimelineio/opentimelineio/adapters/__init__.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/adapters
  copying src/py-opentimelineio/opentimelineio/adapters/cmx_3600.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/adapters
  copying src/py-opentimelineio/opentimelineio/adapters/otiod.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/adapters
  copying src/py-opentimelineio/opentimelineio/adapters/fcp_xml.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/adapters
  creating build/lib.macosx-10.13-x86_64-3.9/opentimelineio/schema
  copying src/py-opentimelineio/opentimelineio/schema/timeline.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/schema
  copying src/py-opentimelineio/opentimelineio/schema/track.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/schema
  copying src/py-opentimelineio/opentimelineio/schema/transition.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/schema
  copying src/py-opentimelineio/opentimelineio/schema/external_reference.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/schema
  copying src/py-opentimelineio/opentimelineio/schema/image_sequence_reference.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/schema
  copying src/py-opentimelineio/opentimelineio/schema/__init__.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/schema
  copying src/py-opentimelineio/opentimelineio/schema/serializable_collection.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/schema
  copying src/py-opentimelineio/opentimelineio/schema/schemadef.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/schema
  copying src/py-opentimelineio/opentimelineio/schema/marker.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/schema
  copying src/py-opentimelineio/opentimelineio/schema/stack.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/schema
  copying src/py-opentimelineio/opentimelineio/schema/clip.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/schema
  copying src/py-opentimelineio/opentimelineio/schema/generator_reference.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/schema
  copying src/py-opentimelineio/opentimelineio/schema/effect.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/schema
  copying src/py-opentimelineio/opentimelineio/schema/foo.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/schema
  creating build/lib.macosx-10.13-x86_64-3.9/opentimelineio/schemadef
  copying src/py-opentimelineio/opentimelineio/schemadef/__init__.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/schemadef
  creating build/lib.macosx-10.13-x86_64-3.9/opentimelineio/console
  copying src/py-opentimelineio/opentimelineio/console/otiostat.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/console
  copying src/py-opentimelineio/opentimelineio/console/otiocat.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/console
  copying src/py-opentimelineio/opentimelineio/console/otioconvert.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/console
  copying src/py-opentimelineio/opentimelineio/console/console_utils.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/console
  copying src/py-opentimelineio/opentimelineio/console/__init__.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/console
  copying src/py-opentimelineio/opentimelineio/console/otiopluginfo.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/console
  copying src/py-opentimelineio/opentimelineio/console/autogen_plugin_documentation.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/console
  copying src/py-opentimelineio/opentimelineio/console/autogen_serialized_datamodel.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/console
  creating build/lib.macosx-10.13-x86_64-3.9/opentimelineview
  copying src/opentimelineview/console.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineview
  copying src/opentimelineview/ruler_widget.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineview
  copying src/opentimelineview/timeline_widget.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineview
  copying src/opentimelineview/__init__.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineview
  copying src/opentimelineview/details_widget.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineview
  copying src/opentimelineview/settings.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineview
  copying src/opentimelineview/track_widgets.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineview
  creating build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib
  copying contrib/opentimelineio_contrib/__init__.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib
  creating build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters
  copying contrib/opentimelineio_contrib/adapters/kdenlive.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters
  copying contrib/opentimelineio_contrib/adapters/extern_rv.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters
  copying contrib/opentimelineio_contrib/adapters/advanced_authoring_format.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters
  copying contrib/opentimelineio_contrib/adapters/ffmpeg_burnins.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters
  copying contrib/opentimelineio_contrib/adapters/extern_maya_sequencer.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters
  copying contrib/opentimelineio_contrib/adapters/__init__.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters
  copying contrib/opentimelineio_contrib/adapters/fcpx_xml.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters
  copying contrib/opentimelineio_contrib/adapters/maya_sequencer.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters
  copying contrib/opentimelineio_contrib/adapters/rv.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters
  copying contrib/opentimelineio_contrib/adapters/xges.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters
  copying contrib/opentimelineio_contrib/adapters/ale.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters
  copying contrib/opentimelineio_contrib/adapters/hls_playlist.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters
  copying contrib/opentimelineio_contrib/adapters/burnins.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters
  creating build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters/tests
  copying contrib/opentimelineio_contrib/adapters/tests/test_hls_playlist_adapter.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters/tests
  copying contrib/opentimelineio_contrib/adapters/tests/tests_xges_adapter.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters/tests
  copying contrib/opentimelineio_contrib/adapters/tests/__init__.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters/tests
  copying contrib/opentimelineio_contrib/adapters/tests/test_fcpx_adapter.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters/tests
  copying contrib/opentimelineio_contrib/adapters/tests/test_kdenlive_adapter.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters/tests
  copying contrib/opentimelineio_contrib/adapters/tests/test_maya_sequencer.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters/tests
  copying contrib/opentimelineio_contrib/adapters/tests/test_aaf_adapter.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters/tests
  copying contrib/opentimelineio_contrib/adapters/tests/test_ale_adapter.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters/tests
  copying contrib/opentimelineio_contrib/adapters/tests/test_burnins.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters/tests
  copying contrib/opentimelineio_contrib/adapters/tests/test_rvsession.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters/tests
  creating build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters/aaf_adapter
  copying contrib/opentimelineio_contrib/adapters/aaf_adapter/__init__.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters/aaf_adapter
  copying contrib/opentimelineio_contrib/adapters/aaf_adapter/aaf_writer.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters/aaf_adapter
  running egg_info
  writing OpenTimelineIO.egg-info/PKG-INFO
  writing dependency_links to OpenTimelineIO.egg-info/dependency_links.txt
  writing entry points to OpenTimelineIO.egg-info/entry_points.txt
  writing requirements to OpenTimelineIO.egg-info/requires.txt
  writing top-level names to OpenTimelineIO.egg-info/top_level.txt
  reading manifest file 'OpenTimelineIO.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no files found matching 'CHANGELOG.md'
  no previously-included directories found matching '.github'
  no previously-included directories found matching 'docs'
  no previously-included directories found matching 'doxygen'
  warning: no previously-included files found matching '.gitmodules'
  warning: no previously-included files matching '*.git' found under directory 'src'
  warning: no previously-included files found matching '.readthedocs.yml'
  warning: no previously-included files found matching 'readthedocs-conda.yml'
  warning: no previously-included files found matching '.codecov.yml'
  warning: no previously-included files found matching '.gitlab-ci.yml'
  warning: no previously-included files found matching '.travis.yml'
  warning: no previously-included files found matching '*.pdf'
  warning: no previously-included files found matching 'CODE_OF_CONDUCT.md'
  warning: no previously-included files found matching 'CONTRIBUTING.md'
  warning: no previously-included files found matching 'CONTRIBUTORS.md'
  warning: no previously-included files found matching 'Makefile'
  warning: no previously-included files found matching '*/.DS_Store'
  warning: no previously-included files found matching '.clang-format'
  no previously-included directories found matching 'maintainers'
  no previously-included directories found matching 'tests'
  no previously-included directories found matching 'src/deps/pybind11/tools/clang'
  no previously-included directories found matching 'src/deps/rapidjson/thirdparty'
  adding license file 'LICENSE.txt'
  adding license file 'NOTICE.txt'
  writing manifest file 'OpenTimelineIO.egg-info/SOURCES.txt'
  copying src/py-opentimelineio/opentimelineio/adapters/builtin_adapters.plugin_manifest.json -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio/adapters
  creating build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/application_plugins
  creating build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/application_plugins/rv
  creating build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/application_plugins/rv/example_otio_reader
  copying contrib/opentimelineio_contrib/application_plugins/rv/example_otio_reader/PACKAGE -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/application_plugins/rv/example_otio_reader
  copying contrib/opentimelineio_contrib/application_plugins/rv/example_otio_reader/example_otio_reader_plugin.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/application_plugins/rv/example_otio_reader
  copying contrib/opentimelineio_contrib/application_plugins/rv/example_otio_reader/otio_reader.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/application_plugins/rv/example_otio_reader
  creating build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/application_plugins/tests
  copying contrib/opentimelineio_contrib/application_plugins/tests/__init__.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/application_plugins/tests
  copying contrib/opentimelineio_contrib/application_plugins/tests/test_rv_reader.py -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/application_plugins/tests
  copying contrib/opentimelineio_contrib/adapters/contrib_adapters.plugin_manifest.json -> build/lib.macosx-10.13-x86_64-3.9/opentimelineio_contrib/adapters
  running build_ext
  running OTIO build_ext
  running cmake check
  Traceback (most recent call last):
    File "/Users/felixdavid/Documents/Logiciels/OpenTimelineIO/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
      main()
    File "/Users/felixdavid/Documents/Logiciels/OpenTimelineIO/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/Users/felixdavid/Documents/Logiciels/OpenTimelineIO/.venv/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 204, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "/private/var/folders/dh/48hvyv0d6gz4rx23cq8xxy940000gn/T/pip-build-env-zyf8k08g/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 221, in build_wheel
      return self._build_with_temp_dir(['bdist_wheel'], '.whl',
    File "/private/var/folders/dh/48hvyv0d6gz4rx23cq8xxy940000gn/T/pip-build-env-zyf8k08g/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 207, in _build_with_temp_dir
      self.run_setup()
    File "/private/var/folders/dh/48hvyv0d6gz4rx23cq8xxy940000gn/T/pip-build-env-zyf8k08g/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 150, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 268, in <module>
      setup(
    File "/private/var/folders/dh/48hvyv0d6gz4rx23cq8xxy940000gn/T/pip-build-env-zyf8k08g/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/Applications/Blender2.93.app/Contents/Resources/2.93/python/lib/python3.9/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/Applications/Blender2.93.app/Contents/Resources/2.93/python/lib/python3.9/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/Applications/Blender2.93.app/Contents/Resources/2.93/python/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/private/var/folders/dh/48hvyv0d6gz4rx23cq8xxy940000gn/T/pip-build-env-zyf8k08g/overlay/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "/Applications/Blender2.93.app/Contents/Resources/2.93/python/lib/python3.9/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/Applications/Blender2.93.app/Contents/Resources/2.93/python/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/Applications/Blender2.93.app/Contents/Resources/2.93/python/lib/python3.9/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/Applications/Blender2.93.app/Contents/Resources/2.93/python/lib/python3.9/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/Applications/Blender2.93.app/Contents/Resources/2.93/python/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "setup.py", line 66, in run
      self.build()
    File "setup.py", line 80, in build
      self.cmake_preflight_check()
    File "setup.py", line 144, in cmake_preflight_check
      raise RuntimeError(stderr.strip())
  RuntimeError: CMake Error at /private/var/folders/dh/48hvyv0d6gz4rx23cq8xxy940000gn/T/pip-build-env-zyf8k08g/overlay/lib/python3.9/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
    Could NOT find Python (missing: Python_INCLUDE_DIRS Interpreter
    Development.Module)
  Call Stack (most recent call first):
    /private/var/folders/dh/48hvyv0d6gz4rx23cq8xxy940000gn/T/pip-build-env-zyf8k08g/overlay/lib/python3.9/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
    /private/var/folders/dh/48hvyv0d6gz4rx23cq8xxy940000gn/T/pip-build-env-zyf8k08g/overlay/lib/python3.9/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.21/Modules/FindPython.cmake:556 (find_package_handle_standard_args)
    CMakeLists.txt:49 (find_package)
  ----------------------------------------
  ERROR: Failed building wheel for OpenTimelineIO
Failed to build OpenTimelineIO
ERROR: Could not build wheels for OpenTimelineIO which use PEP 517 and cannot be installed directly

While installing it into a locally installed Python 3.9.2 works.

Tilix4 commented 3 years ago

After some new experimentation, it seems no any opentimelineio version work on Python3.9, they all raise the ModuleNotFoundError: No module named 'opentimelineio._opentime' error.

I must precise I don't get this issue any more. Then the problem to address seems to be on the build stage only and not at the import opentimelineio one.
To confirm this behaviour, I installed OTIO into Blender's site-packages using the local python 3.9.2 and the import works perfectly.

JeanChristopheMorinPerso commented 3 years ago

is it possible we are being hit, on Windows, with the new platform specific dll search behavior?

@meshula I've tried OTIO with python 3.9 a couple of times on Windows and it was working from what I remember.

As for the other platforms, I haven't seen any problem lately when building with Python 3.9.1+.

Tilix4 commented 3 years ago

Python headers will be included into Blender's build: https://developer.blender.org/D12228

meshula commented 3 years ago

That's nice to see!