nateshmbhat / pyttsx3

Offline Text To Speech synthesis for python
Mozilla Public License 2.0
2.15k stars 336 forks source link

No module named 'win32com' #23

Closed adhirmndl closed 3 years ago

adhirmndl commented 6 years ago

-> python pyttsx.py Traceback (most recent call last): File "C:\python\lib\site-packages\pyttsx3__init__.py", line 44, in init eng = _activeEngines[driverName] File "C:\python\lib\weakref.py", line 137, in getitem o = self.data[key]() KeyError: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "pyttsx.py", line 7, in engine = pyttsx3.init(); File "C:\python\lib\site-packages\pyttsx3__init.py", line 46, in init eng = Engine(driverName, debug) File "C:\python\lib\site-packages\pyttsx3\engine.py", line 52, in init self.proxy = driver.DriverProxy(weakref.proxy(self), driverName, debug) File "C:\python\lib\site-packages\pyttsx3\driver.py", line 75, in init self._module = importlib.import_module(name) File "C:\python\lib\importlib\init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "C:\python\lib\site-packages\pyttsx3\drivers\sapi5.py", line 3, in import win32com.client ModuleNotFoundError: No module named 'win32com'

MrValdez commented 6 years ago

try to install pywin32

$ pip install pywin32

josephalway commented 5 years ago

If you recieve errors such as No module named win32com.client, No module named win32, or No module named win32api, you will need to additionally install pypiwin32.

jainil3010 commented 5 years ago

If you recieve errors such as No module named win32com.client, No module named win32, or No module named win32api, you will need to additionally install pypiwin32.

Still Not Working It shows "No module named win32api"

nateshmbhat commented 5 years ago

Please use python 3, the support for python 2 is soon coming to end.

Wlodarski commented 4 years ago

I had the same exact problem and I am on Python 3.6.

Both pip install pypiwin32 and pip install pywin32 executed but I still had the "No module named win32api" error. Then I found this explanation :

THE PROBLEM :

Win32 modules are not guaranteed to install correctly with pip.

THE SOLUTION: Install them directly from packages provided by developers on github

You might want to include the direct link in the documentation.

If you receive errors such as No module named win32com.client, No module named win32, or No module named win32api, you will need to additionally install pypiwin32 with the command pip install pypiwin32 and/or install the precompiled packages provided by developers on GitHub .

shivam1423 commented 4 years ago

I have tried everthing now. 1) pip install pywin32

ERROR: Could not find a version that satisfies the requirement pywin32 (from versions: none)
ERROR: No matching distribution found for pywin32

2) pip install pypiwin32

Collecting pypiwin32
  Using cached pypiwin32-223-py3-none-any.whl (1.7 kB)
ERROR: Could not find a version that satisfies the requirement pywin32>=223 (from pypiwin32) (from versions: none)
ERROR: No matching distribution found for pywin32>=223 (from pypiwin32)

3) Even tried installing the precompiled packages then copied the win32com folder inside my python3.6/site-packages/win32com. Still import win32com

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'win32com'

I am working on ubuntu os, can anyone help me with this.

nateshmbhat commented 3 years ago

Ubuntu doesn't need pypiwin32.

Please see the updated installation instructions in readme