Some python libraries not installing on arch linux

Question:

Today I am tried to install this python project to check my airpods battery percentage on arch linux. So it needs some python libraries to run it. When I going to install pywin32 library with:

pip install pypiwin32

It giving an error like this:

[thinura@archlinux AirStatus]$ pip install pypiwin32
Defaulting to user installation because normal site-packages is not writeable
Collecting pypiwin32
  Using cached pypiwin32-223-py3-none-any.whl (1.7 kB)
  Using cached pypiwin32-219.zip (4.8 MB)
  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 "/tmp/pip-install-prlnjjjx/pypiwin32_8f6ddda811b9496fad06873af2e852d3/setup.py", line 121
          print "Building pywin32", pywin32_version
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
      [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.

Any solution for this? Thanks in advance.

Asked By: Thinura Dinujaya

||

Answers:

Try another version of pypiwin32, for example: pip install pywin32==304

Answered By: Thinura Dinujaya
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.