OpenVoice icon indicating copy to clipboard operation
OpenVoice copied to clipboard

[ERROR] Get target tone color error Numpy is not available

Open hcorn82 opened this issue 1 year ago • 3 comments

For some reasons it's not seeing my correct version of NumPy. Anyone else getting this error?

UserWarning: A NumPy version >=1.18.5 and <1.26.0 is required for this version of SciPy (detected version 1.26.0

hcorn82 avatar Jan 06 '24 06:01 hcorn82

pip uninstall numpy pip install numpy==1.18.5

downgrade

vivekmaru36 avatar Jan 06 '24 10:01 vivekmaru36

Thanks. But somethings still messed up with the versions not aligning, or its not seeing it correctly.

\C:\Users\Courn\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\transformer.py:20: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at ..\torch\csrc\utils\tensor_numpy.cpp:84.) device: torch.device = torch.device(torch._C._get_default_device()), # torch.device('cpu'), Traceback (most recent call last): File "C:\Users\Courn\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\Courn\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "D:\A.I\Audio\OPENVOICE\OpenVoice\openvoice_app.py", line 4, in <module> import gradio as gr File "C:\Users\Courn\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\__init__.py", line 3, in <module> import gradio.components as components File "C:\Users\Courn\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\components\__init__.py", line 1, in <module> from gradio.components.annotated_image import AnnotatedImage File "C:\Users\Courn\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\components\annotated_image.py", line 8, in <module> import numpy as np ModuleNotFoundError: No module named 'numpy'

hcorn82 avatar Jan 06 '24 15:01 hcorn82

Thanks. But somethings still messed up with the versions not aligning, or its not seeing it correctly.

\C:\Users\Courn\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\transformer.py:20: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at ..\torch\csrc\utils\tensor_numpy.cpp:84.) device: torch.device = torch.device(torch._C._get_default_device()), # torch.device('cpu'), Traceback (most recent call last): File "C:\Users\Courn\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\Courn\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "D:\A.I\Audio\OPENVOICE\OpenVoice\openvoice_app.py", line 4, in <module> import gradio as gr File "C:\Users\Courn\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\__init__.py", line 3, in <module> import gradio.components as components File "C:\Users\Courn\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\components\__init__.py", line 1, in <module> from gradio.components.annotated_image import AnnotatedImage File "C:\Users\Courn\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\components\annotated_image.py", line 8, in <module> import numpy as np ModuleNotFoundError: No module named 'numpy'

Where did you run this? venv or conda? If venv, I made this batch file to setup as I also got issues on numpy and wavmark not properly installing.

:: setup.bat
@echo off

:: Install Python 3.9
echo Installing Python 3.9...
curl -o python-3.9.7-amd64.exe https://www.python.org/ftp/python/3.9.7/python-3.9.7-amd64.exe
python-3.9.7-amd64.exe /quiet InstallAllUsers=1 PrependPath=1
del python-3.9.7-amd64.exe

:: Create and activate virtual environment
echo Creating and activating virtual environment...
python -m venv myvenv
call myvenv\Scripts\activate

:: Install dependencies from requirements.txt
echo Installing dependencies from requirements.txt...
pip install -r requirements.txt

echo Setup complete. You are now in the virtual environment.

and then you will run the program through the venv

:: run_openvoice.bat
@echo off

:: Activate virtual environment
call myvenv\Scripts\activate

:: Run python code
python openvoice_app.py

:: Pause to keep the command prompt open
pause


ProjCRys avatar Jan 12 '24 14:01 ProjCRys