RVC-Project / Retrieval-based-Voice-Conversion-WebUI

Easily train a good VC model with voice data <= 10 mins!
MIT License
23.66k stars 3.52k forks source link

"ImportError: No module named scipy" on step 2a #463

Closed Mshriver2 closed 1 year ago

Mshriver2 commented 1 year ago

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. image

Mshriver2 commented 1 year ago

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) image

Mshriver2 commented 1 year ago

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. image

Mshriver2 commented 1 year ago

This is the specific error that goes in the console when clicking "process data". image

i3l3 commented 1 year ago

pip install scipy

Mshriver2 commented 1 year ago

pip install scipy

I have done both "pip install scipy" and "pip3 install scipy" both say they are already installed.

Mshriver2 commented 1 year ago

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. image

ping42 commented 1 year ago

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

MikuAuahDark commented 1 year ago

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.

Mshriver2 commented 1 year ago

This solved my issue. Thanks guys