ManimCommunity / manim-voiceover

Manim plugin for all things voiceover
https://voiceover.manim.community/en/stable
MIT License
154 stars 20 forks source link

Problem to use the RecorderService - Cannot install on Python version 3.12.0; only versions >=3.8,<3.12 are supported. #78

Closed templth closed 5 months ago

templth commented 5 months ago

Preliminaries

Description of error

I have a working sample using the Azure Voiceover and I try to record my voice using RecorderService like this:

from manim import *
from manim_voiceover import VoiceoverScene
#from manim_voiceover.services.azure import AzureService
from manim_voiceover.services.recorder import RecorderService

class TriangleArea(VoiceoverScene):
    def construct(self):

        self.set_speech_service(
          RecorderService()
        )

        # self.set_speech_service(
        #    AzureService(

When I run my test, it asks me to install manim-voiceover[transcribe] (something I don't need actually). I accept but there is an error:

Cannot install on Python version 3.12.0; only versions >=3.8,<3.12 are supported.

Installation logs

$ manim -pql test.py Test --disable_caching
Manim Community v0.18.0

[01/04/24 19:54:20] ERROR    Missing packages. Run `pip install "manim-voiceover[transcribe]"` to be able to transcribe voiceovers.       base.py:145

                    INFO     The extra packages required by SpeechService.set_transcription() are not installed. Shall I install them   helper.py:165

                             for you? [Y/n]                                                                                                          

[01/04/24 19:58:54] INFO     Installing transcribe...                                                                                   helper.py:175

WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.

Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.

To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.

Requirement already satisfied: manim-voiceover[transcribe] in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (0.3.4.post1)

Requirement already satisfied: manim in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from manim-voiceover[transcribe]) (0.18.0)

Requirement already satisfied: mutagen<2.0.0,>=1.46.0 in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from manim-voiceover[transcribe]) (1.47.0)

Collecting openai-whisper<20230315,>=20230314 (from manim-voiceover[transcribe])

  Using cached openai-whisper-20230314.tar.gz (792 kB)

  Installing build dependencies ... done

  Getting requirements to build wheel ... done

  Preparing metadata (pyproject.toml) ... done

Requirement already satisfied: pip>=21.0.1 in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from manim-voiceover[transcribe]) (23.3.2)

Requirement already satisfied: pydub<0.26.0,>=0.25.1 in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from manim-voiceover[transcribe]) (0.25.1)

Requirement already satisfied: python-dotenv<0.22.0,>=0.21.0 in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from manim-voiceover[transcribe]) (0.21.1)

Requirement already satisfied: python-slugify<9.0.0,>=8.0.1 in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from manim-voiceover[transcribe]) (8.0.1)

Requirement already satisfied: sox<2.0.0,>=1.4.1 in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (from manim-voiceover[transcribe]) (1.4.1)

Collecting stable-ts<3.0.0,>=2.6.2 (from manim-voiceover[transcribe])

  Using cached stable-ts-2.14.2.tar.gz (121 kB)

  Installing build dependencies ... done

  Getting requirements to build wheel ... done

  Preparing metadata (pyproject.toml) ... done

Collecting numba (from openai-whisper<20230315,>=20230314->manim-voiceover[transcribe])

  Using cached numba-0.58.1.tar.gz (2.6 MB)

  Installing build dependencies ... done

  Getting requirements to build wheel ... error

  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.

  │ exit code: 1

  ╰─> [21 lines of output]

      Traceback (most recent call last):

        File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>

          main()

        File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main

          json_out['return_val'] = hook(**hook_input['kwargs'])

                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

        File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel

          return hook(config_settings)

                 ^^^^^^^^^^^^^^^^^^^^^

        File "/private/var/folders/dn/t93q8nhd5zdfpvn62xkhxx1r0000gn/T/pip-build-env-l8xzv1z6/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel

          return self._get_build_requires(config_settings, requirements=['wheel'])

                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

        File "/private/var/folders/dn/t93q8nhd5zdfpvn62xkhxx1r0000gn/T/pip-build-env-l8xzv1z6/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires

          self.run_setup()

        File "/private/var/folders/dn/t93q8nhd5zdfpvn62xkhxx1r0000gn/T/pip-build-env-l8xzv1z6/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 480, in run_setup

          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)

        File "/private/var/folders/dn/t93q8nhd5zdfpvn62xkhxx1r0000gn/T/pip-build-env-l8xzv1z6/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup

          exec(code, locals())

        File "<string>", line 51, in <module>

        File "<string>", line 48, in _guard_py_ver

      RuntimeError: Cannot install on Python version 3.12.0; only versions >=3.8,<3.12 are supported.

      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.

error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.

│ exit code: 1

╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

[04.01.2024 19:59:04] INFO     Installed missing extras. Please run Manim again.                                                        helper.py:177

Installed missing extras. Please run Manim again.

System specifications

System Details - OS (with version, e.g., Windows 10 v2004 or macOS 10.15 (Catalina)): macOS Ventura 13.6.1 - Python version (`python/py/python3 --version`): 3.12.0 - Installed modules (provide output from `pip list`): ``` Package Version ------------------------------------ ----------- azure-cognitiveservices-speech 1.32.1 certifi 2023.7.22 charset-normalizer 3.3.2 click 8.1.7 click-default-group 1.2.4 cloup 2.1.2 Cython 3.0.5 decorator 5.1.1 glcontext 2.5.0 gTTS 2.4.0 idna 3.4 isosurfaces 0.1.0 manim 0.18.0 manim-voiceover 0.3.4.post1 ManimPango 0.5.0 mapbox-earcut 1.0.1 markdown-it-py 3.0.0 mdurl 0.1.2 moderngl 5.8.2 moderngl-window 2.4.4 multipledispatch 1.0.0 mutagen 1.47.0 networkx 3.2.1 numpy 1.26.1 Pillow 9.5.0 pip 23.3.2 PyAudio 0.2.14 pycairo 1.25.1 pydub 0.25.1 pyglet 2.0.10 Pygments 2.16.1 pynput 1.7.6 pyobjc-core 10.1 pyobjc-framework-ApplicationServices 10.1 pyobjc-framework-Cocoa 10.1 pyobjc-framework-CoreText 10.1 pyobjc-framework-Quartz 10.1 pyrr 0.10.3 python-dotenv 0.21.1 python-slugify 8.0.1 requests 2.31.0 rich 13.6.0 scipy 1.11.3 screeninfo 0.8.1 setuptools 68.2.2 six 1.16.0 skia-pathops 0.8.0.post1 sox 1.4.1 srt 3.5.3 svgelements 1.9.6 text-unidecode 1.3 tqdm 4.66.1 typing_extensions 4.8.0 urllib3 2.0.7 watchdog 3.0.0 ```

Additional comments

templth commented 5 months ago

Hello,

I switched to Python 3.11 and I'm now able to the RecorderService.