Python 3.6 Modulenotfounderror: No Module Named 'pyttsx3'
Solution 1:
Start a pyCharm terminal window, then install 'pipenv' which is an improved pip replacement as follows:
pip install -u pipenv
Then use pipenv instead of pip as this will create it's own Pipfile and virtualenv. You can install pyttsx3 as follows:
pipenv install pyttsx3
This will create a Pipfile and a Pipfile.lock which pycharm should pickup and ensure it's using the correct python version and virtualenv environment. Otherwise check that your python interpreter is set correctly in "Run/Debug configurations". If it's not in that list then you can add a new python interpreter via the Preferences->Project->Project Interpreter option.
Solution 2:
If you're using Python 3 then use
pip3 install pyttsx3
Solution 3:
Well i might be a little late but incase anyone is still having problem, i managed to fix it with py -m pip install pyttsx3
Solution 4:
I had the same issue.
All I did is used 'python <filename>
' to run the program instead of 'python3 <filename>
' and it WORKED.
I am not sure, but maybe pyttsx3 does not support the python3 syntax to find itself.
I hope this helps anyone out there, who searched for hours just like me.
Solution 5:
Here a solution on my mac with BigSur OS, maybe because i have a mixed configuration
so i try pip3 install pyttsx3 and instales but checkin in different place:
when import fails throwing an error. So i decided to go on and i found where the pip3 installed the pkgs:
check if is installed:
python3 -m pyttsx3
/Applications/Xcode.app/Contents/Developer/usr/bin/python3: Nomodule named pyttsx3
python -m pyttsx3
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: Nomodule named pyttsx3
pip3 install pyttsx3
first check where is a previus version:
ls -lstr /Users/paul/Library/Python/3.7/lib/python/site-packages
...
0 drwxr-xr-x 8 paul staff 256 Mar 2 01:52 pyobjc-7.1.dist-info
0 drwxr-xr-x 9 paul staff 288 Mar 2 01:52 pyttsx3
0 drwxr-xr-x 9 paul staff 288 Mar 2 01:52 pyttsx3-2.90.dist-info
0 drwxr-xr-x 17 paul staff 544 Mar 2 02:44 urllib3
0 drwxr-xr-x 8 paul staff 256 Mar 2 02:44 urllib3-1.26.3.dist-info
0 drwxr-xr-x 9 paul staff 288 Mar 2 02:44 soupsieve
0 drwxr-xr-x 8 paul staff 256 Mar 2 02:44 soupsieve-2.2.dist-info
8 -rw-r--r-- 1 paul staff 544 Mar 2 02:44 rubicon_
...
python3 --version
Python 3.8.2
check the path of the pkg on your system with:
python -m pyttsx3
Then you just have to copy to the path where you need to use the package.
sudo cp -r /Users/paul/Library/Python/3.7/lib/python/site-packages/pyttsx3/ /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages
sudo cp -r /Users/paul/Library/Python/3.7/lib/python/site-packages/pyttsx3-2.90.dist-info /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages
regards
Post a Comment for "Python 3.6 Modulenotfounderror: No Module Named 'pyttsx3'"