Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install win32com.client on Python 3.4 or Python 2.7

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

like image 560
Jen Avatar asked Dec 28 '17 18:12

Jen


People also ask

How do I know if win32com client is installed?

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.

What is win32com client in Python?

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.

Does pywin32 work on 64 bit Python?

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.


2 Answers

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
like image 51
pylang Avatar answered Sep 25 '22 23:09

pylang


Install the package via command prompt or Terminal of your python IDE(ex: PyCharm)

pip install pywin32
like image 29
RITA KUSHWAHA Avatar answered Sep 25 '22 23:09

RITA KUSHWAHA