Hello, I am struggling with import pyttsx3 (also had problems with other import modules). I did the standard command "pip install pyttsx3" and made sure the version aligned with Python 3.9.13.
I checked the bash again and it does indeed say that it has been downloaded. Great. When I imported it onto the Flask server, it failed and I got the following error:
2023-08-02 18:30:42,002: Error running WSGI application 2023-08-02
18:30:42,007: ModuleNotFoundError: No module named 'pyttsx3'
2023-08-02 18:30:42,008: File
"/var/www/lyraassistant_eu_pythonanywhere_com_wsgi.py", line 16, in
<module> 2023-08-02 18:30:42,008: from flask_app import app as
application # noqa 2023-08-02 18:30:42,008: 2023-08-02 18:30:42,008:
File "/home/LyraAssistant/mysite/flask_app.py", line 6, in <module>
2023-08-02 18:30:42,008: import pyttsx3 2023-08-02 18:30:42,008:
*************************************************** 2023-08-02 18:30:42,008: If you're seeing an import error and don't know why,
2023-08-02 18:30:42,008: we have a dedicated help page to help you
debug: 2023-08-02 18:30:42,009:
https://help.pythonanywhere.com/pages/DebuggingImportError/ 2023-08-02
18:30:42,009: ***************************************************
I went to the DebuggingImportError site, and honestly, it ended up confusing me more. I tried importing sys and did the following line:
sys.path.append("/home/LyraAssistant/.local/bin/python")
Still didn't work. Pretty hard stuck, I know it is mentioning an error with WSGI but I am too inexperienced with Flask to understand it. Any help is appreciated. Thank you!