1

I'm trying to install Win32com using the command line and ran the following command pip install pypiwin32

It downloaded the package, but then gave me this error:

Collecting pypiwin32
  Downloading pypiwin32-223-py3-none-any.whl (1.7 kB)
  Downloading pypiwin32-219.zip (4.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.8/4.8 MB 7.4 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [7 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/85/p553fys947d7d6pf2mvx_pwr0000gp/T/pip-install-u5xfscyc/pypiwin32_980f557faf9041acbc71c618c1861819/setup.py", line 121
          print "Building pywin32", pywin32_version
                ^
      SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Building pywin32", pywin32_version)?
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I've never gotten an error like this when trying to download a python module and have no clue how to fix this.

  • 2
    The error is from python2 code running in a python3 interpreter, but win32com isn't going to run under linux anyway: https://stackoverflow.com/questions/53375217/is-win32com-library-available-on-linux – dirck Nov 18 '22 at 19:52
  • 1
    Also, *pypiwin22* is garbage, don't use it. Similar: [\[SO\]: Install win32com on MacOs and Linux (@CristiFati's answer)](https://stackoverflow.com/a/65030870/4788546). – CristiFati Nov 19 '22 at 00:50

0 Answers0