Jetson Nano
Ubuntu18.04
Python 3.6.9
PyQt5 Version: 5.10.1+dfsg-1ubuntu2
PyQt5 installed, use apt install xxx
I tried to excute
from PyQt5.QtTextToSpeech import QTextToSpeech
I got an error:
Python 3.6.9 (default, Mar 10 2023, 16:46:00)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt5.QtTextToSpeech import QTextToSpeech
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'PyQt5.QtTextToSpeech'
I tried to install
sudo apt install python3-pyqt5
but nothing changed. How can I install the module for my machine.
You can try installing the required PyQt5 modules using pip instead.
Ensure that pip is installed. You can install it using apt if it's not already installed:
Then, install PyQt5 using pip:
This will install PyQt5 along with all its components, including
QtTextToSpeech. After installing PyQt5 withpip, try importingQTextToSpeechagain in your Python script: