YaoFANGUK / video-subtitle-generator

视频音频生成字幕,生成srt文件。无需申请第三方API,本地实现音频转文本。基于Transformer的视频字幕生成框架。A GUI tool for generating subtitle from videos and generating srt files.
Apache License 2.0
857 stars 164 forks source link

SystemError: initialization of _internal failed without raising an exception #22

Open SequoiaDu opened 1 year ago

SequoiaDu commented 1 year ago

GPU: Tesla P4 pyTorch: 2.0.1 (CUDA 11.8).

I first set up a new conda environment following the instructions, but the model was running on the CPU.

I then installed pyTorch CUDA using the command generated on the official website. Now running vsg throws the following error.

Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Users\USERNAME\.conda\envs\vsgEnv\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
  File "C:\Users\USERNAME\.conda\envs\vsgEnv\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "gui.py", line 173, in task
    from backend import main
  File "D:\Program Files\Video Subtitle Generator\backend\main.py", line 15, in <module>
    import librosa
  File "C:\Users\USERNAME\.conda\envs\vsgEnv\lib\site-packages\librosa\__init__.py", line 209, in <module>
    from . import core
  File "C:\Users\USERNAME\.conda\envs\vsgEnv\lib\site-packages\librosa\core\__init__.py", line 5, in <module>
    from .convert import *  # pylint: disable=wildcard-import
  File "C:\Users\USERNAME\.conda\envs\vsgEnv\lib\site-packages\librosa\core\convert.py", line 7, in <module>
    from . import notation
  File "C:\Users\USERNAME\.conda\envs\vsgEnv\lib\site-packages\librosa\core\notation.py", line 8, in <module>
    from ..util.exceptions import ParameterError
  File "C:\Users\USERNAME\.conda\envs\vsgEnv\lib\site-packages\librosa\util\__init__.py", line 77, in <module>
    from .utils import *  # pylint: disable=wildcard-import
  File "C:\Users\USERNAME\.conda\envs\vsgEnv\lib\site-packages\librosa\util\utils.py", line 9, in <module>
    import numba
  File "C:\Users\USERNAME\.conda\envs\vsgEnv\lib\site-packages\numba\__init__.py", line 42, in <module>
    from numba.np.ufunc import (vectorize, guvectorize, threading_layer,
  File "C:\Users\USERNAME\.conda\envs\vsgEnv\lib\site-packages\numba\np\ufunc\__init__.py", line 3, in <module>
    from numba.np.ufunc.decorators import Vectorize, GUVectorize, vectorize, guvectorize
  File "C:\Users\USERNAME\.conda\envs\vsgEnv\lib\site-packages\numba\np\ufunc\decorators.py", line 3, in <module>
    from numba.np.ufunc import _internal
SystemError: initialization of _internal failed without raising an exception

Is there any specific pyTorch version/configuration I should use? Thanks!

YaoFANGUK commented 1 year ago

you can just try

pip install -r requirements.txt
NingerJohn commented 1 year ago

@SequoiaDu 你好,你的问题解决了吗?