How to Install Win32Com. Client on Python 3.4 or Python 2.7

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

0

3 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
7

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

pip install pywin32

first command work for me somehow.........

C:\Users\AL MARUF>pip install pypiwin32
Collecting pypiwin32
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x032A8C70>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/pypiwin32/
  Downloading 
Collecting pywin32>=223 (from pypiwin32)
  Downloading  (8.3MB)
     |████████████████████████████████| 8.3MB 142kB/s
Installing collected packages: pywin32, pypiwin32
Successfully installed pypiwin32-223 pywin32-224

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Marcus Vance
Author

Marcus Vance

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.