Retrieval-based-Voice-Conversion-WebUI
Retrieval-based-Voice-Conversion-WebUI copied to clipboard
"ImportError: No module named scipy" on step 2a
When I attempt to click the "process data" button under the "Train" tab, I get the following error in terminal
Traceback (most recent call last):
File "trainset_preprocess_pipeline_print.py", line 2, in <module>
from scipy import signal
ImportError: No module named scipy
Any ideas what I can do to fix it? scipy is already shown as installed.
I have my training folder path set to this folder full of vocal only .wavs (don't know why they say instrumental but they are only vocal)
When running the scipy import command in the python3 interrupter I get the following. So it looks like it is installed so I am a bit confused of what the issue is.
This is the specific error that goes in the console when clicking "process data".
pip install scipy
pip install scipy
I have done both "pip install scipy" and "pip3 install scipy" both say they are already installed.
If I open a python terminal and do "from scipy import signal" it works just fine without error. However when I try to "process data" I get the error that their is no module. So I am very confused to what is happening. I pulled the latest commit today and the issue is still happening.
I think it is trying to run the underlying script with python 2, which is normally referred by python
command used in the script in Linux/Mac.
You could solve this by editing line 39 in config.py
change
"--pycmd", type=str, default="python", help="Python command"
into
"--pycmd", type=str, default="python3", help="Python command"
which could ask the environment to run those scripts with python 3, the one you installed scipy and other packages in.
then re-run python3 infer-web.py
I can reproduce this in Windows 11 (native) by running venv\Scripts\python infer-web.py
directly without activating virtual environment first. The web will run but it won't able to find scipy
.
EDIT2: Or modify config.py
as per above but change it to default=sys.executable
instead. Just make sure to import sys
on top of the file first.
EDIT: https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/7f4bdf42b01721de30848f661703df9524282114/config.py#L39
It needs to default to sys.executable
instead of python
.
This solved my issue. Thanks guys