CorentinJ / Real-Time-Voice-Cloning

Clone a voice in 5 seconds to generate arbitrary speech in real-time
Other
51.55k stars 8.64k forks source link

Execution error: undefined symbol: _ZdlPvm, version Qt_5 #1096

Open Baquara opened 1 year ago

Baquara commented 1 year ago

Hello,

I am trying to run the project using

python demo_toolbox.py

But I am running into:

[privateserver@privateserver Real-Time-Voice-Cloning]$ python demo_toolbox.py
Arguments:
    datasets_root:   None
    models_dir:      saved_models
    cpu:             False
    seed:            None

Traceback (most recent call last):
  File "/home/privateserver/Real-Time-Voice-Cloning/demo_toolbox.py", line 37, in <module>
    Toolbox(**arg_dict)
  File "/home/privateserver/Real-Time-Voice-Cloning/toolbox/__init__.py", line 65, in __init__
    self.ui = UI()
  File "/home/privateserver/Real-Time-Voice-Cloning/toolbox/ui.py", line 457, in __init__
    self.projections_layout.addWidget(FigureCanvas(fig))
TypeError: addWidget(self, QWidget, stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'FigureCanvasQTAgg'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/home/privateserver/Real-Time-Voice-Cloning/toolbox/__init__.py", line 72, in excepthook
    self.ui.log("Exception: %s" % exc_value)
AttributeError: 'Toolbox' object has no attribute 'ui'

Original exception was:
Traceback (most recent call last):
  File "/home/privateserver/Real-Time-Voice-Cloning/demo_toolbox.py", line 37, in <module>
    Toolbox(**arg_dict)
  File "/home/privateserver/Real-Time-Voice-Cloning/toolbox/__init__.py", line 65, in __init__
    self.ui = UI()
  File "/home/privateserver/Real-Time-Voice-Cloning/toolbox/ui.py", line 457, in __init__
    self.projections_layout.addWidget(FigureCanvas(fig))
TypeError: addWidget(self, QWidget, stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'FigureCanvasQTAgg'
python: symbol lookup error: /usr/lib/python3.10/site-packages/PyQt5/Qt5/plugins/platforms/../../lib/libQt5XcbQpa.so.5: undefined symbol: _ZdlPvm, version Qt_5

What could be the problem here?

SeanPesce commented 1 year ago

I was able to get mine working on WSL 2 (Windows 10) by editing the imports of toolbox/ui.py like so:

import matplotlib
matplotlib.rcParams['backend']='GTK3Cairo'
import matplotlib.pyplot as plt
JasperMace commented 1 year ago

It took a lot of digging but I found that if I went into the ui.py file and moved the matplotlib imports after the PyQt5 imports then the UI would actually open. I don't know if I ruined anything else but at least the UI opens. Example:

from PyQt5.QtCore import Qt, QStringListModel
from PyQt5.QtWidgets import *
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas