11

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 3

11

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
Sign up to request clarification or add additional context in comments.

7 Comments

Thanks, I got error message as below. But I can get on to pypi.python.org/pypi from the internet explorer. C:\Users\n0266997\AppData\Local\Programs\Python\Python36-32>python -m pip instal l pypiwin32 Collecting pypiwin32 Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connec tion broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.conne ction.VerifiedHTTPSConnection object at 0x032F6390>, 'Connection to pypi.python. org timed out. (connect timeout=15)')': /simple/pypiwin32/
That's a better sign that you are actually using pip. I'd try again a bit later as the connection to pypi via pip can be unrealiable at times. You may also consider updating your pip. If you are considering Python long-term, I'd strongly suggest installing Python again via Anaconda and creating a new conda environment.
I tried to update PIP using the command below, still get the connection error. Is there a way I can download win32com.client and manually install it myself? C:\Users\n0266997\AppData\Local\Programs\Python\Python36-32>python -m pip instal l -U pip Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connecti on broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connect ion.VerifiedHTTPSConnection object at 0x032CAF30>, 'Connection to pypi.python.or g timed out. (connect timeout=15)')': /simple/pip/
I used the commend python -m pip install pypiwin32 on python 2.711. It connects, but gives me error message: Could not find a version that satisfies the requirement pypiwin32 (from versio ns: ) No matching distribution found for pypiwin32
I experienced a similar issue a few days ago, but today I was able to install it in my Python 2 environment. You may have an odd python installation or pypi is not working well at the moment. Best advice I have is try again later.
|
6

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

pip install pywin32

Comments

0

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 https://files.pythonhosted.org/packages/d0/1b/2f292bbd742e369a100c91faa0483172cd91a1a422a6692055ac920946c5/pypiwin32-223-py3-none-any.whl
Collecting pywin32>=223 (from pypiwin32)
  Downloading https://files.pythonhosted.org/packages/8a/37/917c4020e93e0e854d4cbff1cbdf14ec45a6d1cedf52f8cafdea5b22451a/pywin32-224-cp37-cp37m-win32.whl (8.3MB)
     |████████████████████████████████| 8.3MB 142kB/s
Installing collected packages: pywin32, pypiwin32
Successfully installed pypiwin32-223 pywin32-224

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.