I tried to install win32com.client using the syntax below, but no success
>>> pip install pywin32
SyntaxError: invalid syntax
>>> pypiwin32
Traceback (most recent call last): File "", line 1, in pypiwin32 NameError: name 'pypiwin32' is not defined
>>> pip install pypiwin32
SyntaxError: invalid syntax
>>> pip install pypiwin32-220-cp36-none-win32.whl
SyntaxError: invalid syntax
Check if you have the package installed: python3 -m pip list -v With -v it will also show you the location where the package is installed.
There are several APIs available to convert text to speech in python. One of such APIs available in the python library commonly known as win32com library. It provides a bunch of methods to get excited about and one of them is the Dispatch method of the library.
Some packages have a 32bit and a 64bit version available - you must download the one which corresponds to the Python you have installed. Even if you have a 64bit computer, if you installed a 32bit version of Python you must install the 32bit version of pywin32.
Those errors suggest you are inside a Python environment. For example, the Python REPL starts with three chevrons, >>>
. You don't want this. Run these commands outside of Python in the system command prompt either through Windows or Linux etc.
The following worked for me on Python 2.7:
> pip install pypiwin32
Also try the following from this post:
> python -m pip install pypiwin32
Install the package via command prompt or Terminal of your python IDE(ex: PyCharm)
pip install pywin32
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With