Skip to content Skip to sidebar Skip to footer

Not Able To "import Win32com.shell.shell" In Python3.8.3 To Execute Admin Command Prompt Commands Using Python3

We were using python 2 in our project and we had created various scripts that work on Windows 10 using pywin32 lib and were using import win32com.shell.shell as shell and then exec

Solution 1:

win32com.shell.shell as shell would be imported exclusively on python2 if you wanted to upgrade you would have to update to a newer version of pywin32. A github repo has released v225 which supports Python 3.8.3 install the files and you should be able to use your code without any import errors

https://github.com/CristiFati/Prebuilt-Binaries/tree/master/PyWin32/v225

if that does not work that alternative solution is using a replica module

pip3 install pypiwin32


import pypiwin32 

this module should come with shell capabilities


Post a Comment for "Not Able To "import Win32com.shell.shell" In Python3.8.3 To Execute Admin Command Prompt Commands Using Python3"