Skip to content

distutils.spawn.find_executable not working to find ffmpeg #5837

@hubutui

Description

@hubutui

🐛 Describe the bug

distutils.spawn.find_executable not working to find ffmpeg

Versions

vision/setup.py

Line 343 in e8cb0ba

ffmpeg_exe = distutils.spawn.find_executable("ffmpeg")

for python 3.10,

import distutils
distutils.spawn.find_executable("ffmpeg")

outputs:

Traceback (most recent call last):
  File "<input>", line 1, in <module>
    distutils.spawn.find_executable("ffmpeg")
AttributeError: module 'distutils' has no attribute 'spawn'

so ffmpeg_exe = distutils.spawn.find_executable("ffmpeg") leads to ffmpeg_exe = None
use this instead:

from distutils import spawn
spawn.find_executable('ffmpeg')

also,

DeprecationWarning: The distutils package is deprecated an
d slated for removal in Python 3.12. Use setuptools or check PEP 632 for potent
ial alternatives

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions