enthought / comtypes

A pure Python, lightweight COM client and server framework, based on the ctypes Python FFI package.
Other
282 stars 96 forks source link

PyWinAuto installation fails on Python 3.12 #504

Closed manju1847 closed 6 months ago

manju1847 commented 6 months ago

Trying to install PyWinAuto on Python 3.12 environment. But I see errors during installation. I am able to install the same version of PyWinAuto on Python 3.8 and Python 3.10.

D:\softwares\Python12>python --version Python 3.12.1

D:\softwares\Python12>pip list Package Version


comtypes 1.2.1 pip 23.2.1 pywin32 306 six 1.16.0

D:\softwares\Python12>pip install d:\softwares\PyWinAuto\pywinauto-atspi Processing d:\softwares\pywinauto\pywinauto-atspi Installing build dependencies ... error error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [7 lines of output] WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001F765B5C8C0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001F764656810>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001F765D37350>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001F765D37680>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001F765D378C0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/ ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0 (from versions: none) ERROR: No matching distribution found for setuptools>=40.8.0 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

D:\softwares\Python12>

manju1847 commented 6 months ago

My bad, submitted here instead of submitting in PyWinAuto. Hence closing this. Added this issue in PyWinAuto "https://github.com/pywinauto/pywinauto/issues/1368"

junkmd commented 6 months ago

As a maintainer of comtypes, I am just interested to know whether you can do pip install comtypes==1.2.1 in your environment.

If you can do that, and if the installation of packages such as pywinauto, etc. that have comtypes as a dependency fails, then the cause seems to be something other than comtypes.

memo: related to https://github.com/enthought/comtypes/issues/216#issuecomment-1887766659 and https://github.com/enthought/comtypes/issues/216#issuecomment-1888127022

manju1847 commented 6 months ago

Yes. I am able to install comtypes 1.2.1. I think issue is something with PyWinAuto and Python 3.12.

With same comtypes 1.2.1, I am able to install PyWinAuto with Python 3.10.

As you said, issue is not with comtypes.