ImportError while importing test module 'C:\Users\***\projects\speechbrain\speechbrain\tests\integration\neural_networks\ASR_CTC\example_asr_ctc_experiment.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: ..\..\..\anaconda3\lib\importlib\__init__.py:127: in import_module return _bootstrap._gcd_import(name[level:], package, level) tests\integration\neural_networks\ASR_CTC\example_asr_ctc_experiment.py:11: in <module> import speechbrain as sb speechbrain\__init__.py:4: in <module> from .core import Stage, Brain, create_experiment_directory, parse_arguments speechbrain\core.py:31: in <module> from hyperpyyaml import resolve_references ..\..\..\anaconda3\lib\site-packages\hyperpyyaml\__init__.py:7: in <module> from .core import ( ..\..\..\anaconda3\lib\site-packages\hyperpyyaml\core.py:17: in <module> import ruamel.yaml E ModuleNotFoundError: No module named 'ruamel'
Try conda install ruamel.yaml … pip didnt work for me
执行这一条命令后,问题解决。
第二个问题类似下面这样。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
E RuntimeError: Backend "soundfile" is not one of available backends: []. _____________________________________________________________________________________________________ ERROR collecting tests/unittests/test_augment.py _____________________________________________________________________________________________________ tests\unittests\test_augment.py:3: in <module> from speechbrain.dataio.dataio import write_audio speechbrain\__init__.py:4: in <module> from .core import Stage, Brain, create_experiment_directory, parse_arguments speechbrain\core.py:32: in <module> from speechbrain.utils.distributed import run_on_main speechbrain\utils\__init__.py:11: in <module> from . import * # noqa speechbrain\utils\Accuracy.py:7: in <module> from speechbrain.dataio.dataio import length_to_mask speechbrain\dataio\__init__.py:11: in <module> from . import * # noqa speechbrain\dataio\dataio.py:26: in <module> torchaudio.set_audio_backend(torchaudio_backend) ..\..\..\anaconda3\lib\site-packages\torchaudio\backend\utils.py:52: in set_audio_backend raise RuntimeError( E RuntimeError: Backend "soundfile" is not one of available backends: [].
================================================== warnings summary =================================================== ..\..\..\anaconda3\lib\site-packages\pyreadline\py3k_compat.py:8 C:\Users\xxxxx\anaconda3\lib\site-packages\pyreadline\py3k_compat.py:8: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working return isinstance(x, collections.Callable)
..\..\..\anaconda3\lib\site-packages\win32\lib\pywintypes.py:2 C:\Users\xxxxx\anaconda3\lib\site-packages\win32\lib\pywintypes.py:2: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp, sys, os
..\..\..\anaconda3\lib\site-packages\torchaudio\extension\extension.py:13 C:\Users\xxxxx\anaconda3\lib\site-packages\torchaudio\extension\extension.py:13: UserWarning: torchaudio C++ extension is not available. warnings.warn('torchaudio C++ extension is not available.')
tests/unittests/test_RNN.py::test_RNN C:\Users\xxxxx\anaconda3\lib\site-packages\torch\nn\modules\rnn.py:201: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! if self.input_size != input.size(-1):
tests/unittests/test_RNN.py::test_RNN C:\Users\xxxxx\anaconda3\lib\site-packages\torch\nn\modules\rnn.py:222: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! if hx.size() != expected_hidden_size:
tests/unittests/test_normalization.py::test_BatchNorm1d tests/unittests/test_normalization.py::test_BatchNorm2d tests/unittests/test_normalization.py::test_InstanceNorm1d tests/unittests/test_normalization.py::test_InstanceNorm2d C:\Users\xxxxx\anaconda3\lib\site-packages\torch\nn\functional.py:2113: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! if size_prods == 1: