Discussion:
How to uninstall Python3.7 in Windows using cmd ?
(too old to reply)
deepalee khare
2020-03-27 12:07:39 UTC
Permalink
Hi,

How to Uninstall Python3.7.3 using cmd ? i tried using cmd: Msiexec
/uninstall C:\Python37\python.exe But it gives me below error: enter
image description here

how do i uninstall it ?

Thanks,
Deepalee Khare
boB Stepp
2020-03-28 00:36:44 UTC
Permalink
On Fri, Mar 27, 2020 at 1:22 PM deepalee khare
Post by deepalee khare
Hi,
How to Uninstall Python3.7.3 using cmd ? i tried using cmd: Msiexec
/uninstall C:\Python37\python.exe But it gives me below error: enter
image description here
how do i uninstall it ?
You appear to be using a version of Windows. You can uninstall Python
like you would most other programs, using the built-in functionality
provided by Windows. For instance in Win10 you can go to the Start
Menu, then settings and there is a section for handling Apps. Find
Python in the list of Apps, click on it and you will get
repair/uninstall links. Earlier versions of Windows are similarly
done.

HTH!
--
boB
Souvik Dutta
2020-03-28 00:44:16 UTC
Permalink
Control panel is still alive. So just using it would be better. Go to
control panel. Then click uninstall a program. Then find python in the list
and double click on it to uninstall.
Post by boB Stepp
On Fri, Mar 27, 2020 at 1:22 PM deepalee khare
Post by deepalee khare
Hi,
How to Uninstall Python3.7.3 using cmd ? i tried using cmd: Msiexec
/uninstall C:\Python37\python.exe But it gives me below error: enter
image description here
how do i uninstall it ?
You appear to be using a version of Windows. You can uninstall Python
like you would most other programs, using the built-in functionality
provided by Windows. For instance in Win10 you can go to the Start
Menu, then settings and there is a section for handling Apps. Find
Python in the list of Apps, click on it and you will get
repair/uninstall links. Earlier versions of Windows are similarly
done.
HTH!
--
boB
--
https://mail.python.org/mailman/listinfo/python-list
Terry Reedy
2020-03-28 18:06:26 UTC
Permalink
Post by deepalee khare
How to Uninstall Python3.7.3 using cmd ? i tried using cmd: Msiexec
/uninstall C:\Python37\python.exe But it gives me below error: enter
image description here
Python is not currently installed with msi, hence cannot use it to
uninstall. Images and attachments are not allowed.
--
Terry Jan Reedy
boB Stepp (boB Stepp)
2020-03-27 07:36:44 UTC
Permalink
On Fri, Mar 27, 2020 at 1:22 PM deepalee khare
Post by deepalee khare
Hi,
How to Uninstall Python3.7.3 using cmd ? i tried using cmd: Msiexec
/uninstall C:\Python37\python.exe But it gives me below error: enter
image description here
how do i uninstall it ?
You appear to be using a version of Windows. You can uninstall Python like you
would most other programs, using the built-in functionality provided by
Windows. For instance in Win10 you can go to the Start Menu, then settings and
there is a section for handling Apps. Find Python in the list of Apps, click
on it and you will get repair/uninstall links. Earlier versions of Windows are
similarly done.

HTH!


--
boB
Souvik Dutta (Souvik Dutta)
2020-03-27 18:14:16 UTC
Permalink
Control panel is still alive. So just using it would be better. Go to control
panel. Then click uninstall a program. Then find python in the list and double
click on it to uninstall.
Post by boB Stepp
On Fri, Mar 27, 2020 at 1:22 PM deepalee khare
Post by deepalee khare
Hi,
How to Uninstall Python3.7.3 using cmd ? i tried using cmd: Msiexec
/uninstall C:\Python37\python.exe But it gives me below error: enter
image description here
how do i uninstall it ?
You appear to be using a version of Windows. You can uninstall Python
like you would most other programs, using the built-in functionality
provided by Windows. For instance in Win10 you can go to the Start
Menu, then settings and there is a section for handling Apps. Find
Python in the list of Apps, click on it and you will get
repair/uninstall links. Earlier versions of Windows are similarly
done.
HTH!
--
boB
--
https://mail.python.org/mailman/listinfo/python-list
Terry Reedy (Terry Reedy)
2020-03-28 02:06:26 UTC
Permalink
Post by deepalee khare
How to Uninstall Python3.7.3 using cmd ? i tried using cmd: Msiexec
/uninstall C:\Python37\python.exe But it gives me below error: enter
image description here
Python is not currently installed with msi, hence cannot use it to uninstall.
Images and attachments are not allowed.


--
Terry Jan Reedy
Mike Dewhirst
2020-03-29 04:17:02 UTC
Permalink
Post by Terry Reedy
Post by deepalee khare
How to Uninstall Python3.7.3 using cmd ? i tried using cmd: Msiexec
/uninstall C:\Python37\python.exe But it gives me below error: enter
image description here
Python is not currently installed with msi, hence cannot use it to
uninstall.  Images and attachments are not allowed.
In that case install that same version of Python to the same location
using msi - then remove it.
Mike Dewhirst (Mike Dewhirst)
2020-03-29 03:17:02 UTC
Permalink
Post by Terry Reedy
Post by deepalee khare
How to Uninstall Python3.7.3 using cmd ? i tried using cmd: Msiexec
/uninstall C:\Python37\python.exe But it gives me below error: enter
image description here
Python is not currently installed with msi, hence cannot use it to
uninstall.� Images and attachments are not allowed.
In that case install that same version of Python to the same location using msi
- then remove it.
Terry Reedy
2020-03-29 11:24:03 UTC
Permalink
Post by Mike Dewhirst
Post by Terry Reedy
Post by deepalee khare
How to Uninstall Python3.7.3 using cmd ? i tried using cmd: Msiexec
/uninstall C:\Python37\python.exe But it gives me below error: enter
image description here
Python is not currently installed with msi, hence cannot use it to
uninstall.  Images and attachments are not allowed.
In that case install that same version of Python to the same location
using msi
Just how do you propose that one do that?

- then remove it.

To clarify, the pydev/python.org installer does not use msi. I don't
know that anyone else does. And if someone did, why do you think it
would also uninstall the current installation?
--
Terry Jan Reedy
Mike Dewhirst
2020-03-30 00:41:02 UTC
Permalink
Post by Terry Reedy
Post by Mike Dewhirst
Post by Terry Reedy
Post by deepalee khare
How to Uninstall Python3.7.3 using cmd ? i tried using cmd: Msiexec
/uninstall C:\Python37\python.exe But it gives me below error: enter
image description here
Python is not currently installed with msi, hence cannot use it to
uninstall.  Images and attachments are not allowed.
In that case install that same version of Python to the same location
using msi
Just how do you propose that one do that?
I would first determine whether it is the 32 or 64 bit version which is
installed. I would then visit www.python.org and download the exact same
python executable installer. Don't know what msi is but it doesn't
matter. I think it just means microsoft installer.

If you launch the installer in Windows and choose the custom install it
will let you select the location. You should choose C:\Python37 as you
have already noted.

It is possible/probable that the installer will detect your existing
Python 3.7.x and offer to repair it. Some parts of Python may have been
omitted from the original installation. With a custom installation the
msi installer lets you tick boxes to decide which components to install.
To cover the uninstallation bases I would tick them all and proceed to
completion.

In (my) theory that will do the install and hopefully let you do an
ordinary Windows uninstall.

I assume (?) the original installation put the usual Python components
including dll libraries in the conventional places for Windows and the
python.org executable installer will follow suit.

The uninstallation probably won't delete the C:\Python37 directory but
you can do that yourself.

If all the above fails, you can delete C:\Python37 and all its content
as a precursor and then go through the installation again and try
uninstalling again.

If that fails just delete C:\Python37 and its contents and hope for the
best.

Good luck

Mike
Post by Terry Reedy
- then remove it.
To clarify, the pydev/python.org installer does not use msi.  I don't
know that anyone else does.  And if someone did, why do you think it
would also uninstall the current installation?
Michael Torrie
2020-03-30 03:55:57 UTC
Permalink
Post by Mike Dewhirst
I would first determine whether it is the 32 or 64 bit version which is
installed. I would then visit www.python.org and download the exact same
python executable installer. Don't know what msi is but it doesn't
matter. I think it just means microsoft installer.
I think you misread both Terry and the original poster.

What Terry was trying to say is that there is no MSI installer available
for python, so you cannot use the Microsoft MSI command line tool
(msiexec), which was what the original poster was asking about. Thus
you cannot use msiexec.exe to remove Python by way of a batch file or
script. He'll have to do it a different way.
Mike Dewhirst
2020-03-30 06:20:33 UTC
Permalink
Post by Michael Torrie
Post by Mike Dewhirst
I would first determine whether it is the 32 or 64 bit version which is
installed. I would then visit www.python.org and download the exact same
python executable installer. Don't know what msi is but it doesn't
matter. I think it just means microsoft installer.
I think you misread both Terry and the original poster.
Maybe so but the method I suggested should install Python in a way which
Windows should be able to uninstall and clear out what was there
previously. That is why I said "it doesn't matter".

I hope.
Post by Michael Torrie
What Terry was trying to say is that there is no MSI installer available
for python, so you cannot use the Microsoft MSI command line tool
(msiexec), which was what the original poster was asking about. Thus
you cannot use msiexec.exe to remove Python by way of a batch file or
script. He'll have to do it a different way.
Dennis Lee Bieber
2020-03-30 01:03:47 UTC
Permalink
Post by Terry Reedy
To clarify, the pydev/python.org installer does not use msi. I don't
know that anyone else does. And if someone did, why do you think it
would also uninstall the current installation?
Because, if you did find an MSI installer, and installed the same
version /over/ the existing install (same directory), then the MSI
uninstall would be removing contents from that directory.

Other than that, you could check if the "common" installers uninstall
files are in the directory... Depends upon what the installer used...

unwise.exe
unins000.exe
uninstall.exe

... are a few of the files I've found just perusing directories under
c:\program files (x86)\

... Or search the registry for a suitable "UninstallString" key (or
"UninstallPath", etd.). After all, if the control panel (or 3rd party --
AVG PC Tuneup) can produce a list of applications to uninstall then there
must be a table /somewhere/ in the system listing the application and the
command needed to do the uninstall (Though I'll admit I'm having trouble
finding it for one of my test cases -- not Python...)

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{5CA49ADF-9C1A-4332-B5AD-F512BE633C1D}]
...
"InstallLocation"="C:\\Python35\\"
"InstallSource"="C:\\Users\\Wulfraed\\AppData\\Roaming\\ActiveState
Software Inc\\ActivePython 3.5.4 Build 3504 (64-bit)
3.5.3504\\install\\E633C1D\\"
...
"UninstallString"=hex(2):4d,00,73,00,69,00,45,00,78,00,65,00,63,00,2e,00,65,00,\

78,00,65,00,20,00,2f,00,49,00,7b,00,35,00,43,00,41,00,34,00,39,00,41,00,44,\

00,46,00,2d,00,39,00,43,00,31,00,41,00,2d,00,34,00,33,00,33,00,32,00,2d,00,\

42,00,35,00,41,00,44,00,2d,00,46,00,35,00,31,00,32,00,42,00,45,00,36,00,33,\
00,33,00,43,00,31,00,44,00,7d,00,00,00
...

(Apparently some are stored in a 16-bit encoding...)
Post by Terry Reedy
bs = """4d,00,73,00,69,00,45,00,78,00,65,00,63,00,2e,00,65,00,
...
78,00,65,00,20,00,2f,00,49,00,7b,00,35,00,43,00,41,00,34,00,39,00,41,00,44,
...
00,46,00,2d,00,39,00,43,00,31,00,41,00,2d,00,34,00,33,00,33,00,32,00,2d,00,
...
42,00,35,00,41,00,44,00,2d,00,46,00,35,00,31,00,32,00,42,00,45,00,36,00,33,
... 00,33,00,43,00,31,00,44,00,7d,00,00,00"""
Post by Terry Reedy
bl = [int(b, 16) for b in bs.split(",")]
c = "".join([chr(b) for b in bl if b > 0])
c
'MsiExec.exe /I{5CA49ADF-9C1A-4332-B5AD-F512BE633C1D}'
... compared to ...

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\1760-0118-5542-0450]
"DisplayName"="SimSmith 16.3"
"DisplayIcon"="C:\\Program Files\\SimSmith\\.install4j\\installer.ico"
"UninstallString"="\"C:\\Program Files\\SimSmith\\uninstall.exe\""
"Publisher"="ae6ty"
--
Wulfraed Dennis Lee Bieber AF6VN
***@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/
Terry Reedy (Terry Reedy)
2020-03-28 19:24:02 UTC
Permalink
Post by Mike Dewhirst
Post by Terry Reedy
Post by deepalee khare
How to Uninstall Python3.7.3 using cmd ? i tried using cmd: Msiexec
/uninstall C:\Python37\python.exe But it gives me below error: enter
image description here
Python is not currently installed with msi, hence cannot use it to
uninstall.� Images and attachments are not allowed.
In that case install that same version of Python to the same location
using msi
Just how do you propose that one do that?

- then remove it.

To clarify, the pydev/python.org installer does not use msi. I don't know that
anyone else does. And if someone did, why do you think it would also
uninstall the current installation?

--
Terry Jan Reedy
Mike Dewhirst (Mike Dewhirst)
2020-03-29 23:41:02 UTC
Permalink
Post by Terry Reedy
Post by Mike Dewhirst
Post by Terry Reedy
Post by deepalee khare
How to Uninstall Python3.7.3 using cmd ? i tried using cmd: Msiexec
/uninstall C:\Python37\python.exe But it gives me below error: enter
image description here
Python is not currently installed with msi, hence cannot use it to
uninstall.� Images and attachments are not allowed.
In that case install that same version of Python to the same location
using msi
Just how do you propose that one do that?
I would first determine whether it is the 32 or 64 bit version which is
installed. I would then visit www.python.org and download the exact same python
executable installer. Don't know what msi is but it doesn't matter. I think it
just means microsoft installer.

If you launch the installer in Windows and choose the custom install it will
let you select the location. You should choose C:\Python37 as you have already
noted.

It is possible/probable that the installer will detect your existing Python
3.7.x and offer to repair it. Some parts of Python may have been omitted from
the original installation. With a custom installation the msi installer lets
you tick boxes to decide which components to install. To cover the
uninstallation bases I would tick them all and proceed to completion.

In (my) theory that will do the install and hopefully let you do an ordinary
Windows uninstall.

I assume (?) the original installation put the usual Python components
including dll libraries in the conventional places for Windows and the
python.org executable installer will follow suit.

The uninstallation probably won't delete the C:\Python37 directory but you can
do that yourself.

If all the above fails, you can delete C:\Python37 and all its content as a
precursor and then go through the installation again and try uninstalling
again.

If that fails just delete C:\Python37 and its contents and hope for the best.

Good luck

Mike
Post by Terry Reedy
- then remove it.
To clarify, the pydev/python.org installer does not use msi.� I don't
know that anyone else does.� And if someone did, why do you think it
would also uninstall the current installation?
Michael Torrie (Michael Torrie)
2020-03-29 09:55:56 UTC
Permalink
Post by Mike Dewhirst
I would first determine whether it is the 32 or 64 bit version which is
installed. I would then visit www.python.org and download the exact same
python executable installer. Don't know what msi is but it doesn't
matter. I think it just means microsoft installer.
I think you misread both Terry and the original poster.

What Terry was trying to say is that there is no MSI installer available for
python, so you cannot use the Microsoft MSI command line tool (msiexec), which
was what the original poster was asking about. Thus you cannot use msiexec.exe
to remove Python by way of a batch file or script. He'll have to do it a
different way.
Mike Dewhirst (Mike Dewhirst)
2020-03-30 05:20:32 UTC
Permalink
Post by Michael Torrie
Post by Mike Dewhirst
I would first determine whether it is the 32 or 64 bit version which is
installed. I would then visit www.python.org and download the exact same
python executable installer. Don't know what msi is but it doesn't
matter. I think it just means microsoft installer.
I think you misread both Terry and the original poster.
Maybe so but the method I suggested should install Python in a way which
Windows should be able to uninstall and clear out what was there previously.
That is why I said "it doesn't matter".

I hope.
Post by Michael Torrie
What Terry was trying to say is that there is no MSI installer available
for python, so you cannot use the Microsoft MSI command line tool
(msiexec), which was what the original poster was asking about. Thus
you cannot use msiexec.exe to remove Python by way of a batch file or
script. He'll have to do it a different way.
Dennis Lee Bieber (Dennis Lee Bieber)
2020-03-29 09:03:46 UTC
Permalink
Post by Terry Reedy
To clarify, the pydev/python.org installer does not use msi. I don't
know that anyone else does. And if someone did, why do you think it
would also uninstall the current installation?
Because, if you did find an MSI installer, and installed the same
version /over/ the existing install (same directory), then the MSI uninstall
would be removing contents from that directory.

Other than that, you could check if the "common" installers uninstall
files are in the directory... Depends upon what the installer used...

unwise.exe
unins000.exe
uninstall.exe

... are a few of the files I've found just perusing directories under
c:\program files (x86)\

... Or search the registry for a suitable "UninstallString" key (or
"UninstallPath", etd.). After all, if the control panel (or 3rd party -- AVG PC
Tuneup) can produce a list of applications to uninstall then there
must be a table /somewhere/ in the system listing the application and the
command needed to do the uninstall (Though I'll admit I'm having trouble
finding it for one of my test cases -- not Python...)

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{5CA49A
DF-9C1A-4332-B5AD-F512BE633C1D}]
...
"InstallLocation"="C:\\Python35\\"
"InstallSource"="C:\\Users\\Wulfraed\\AppData\\Roaming\\ActiveState
Software Inc\\ActivePython 3.5.4 Build 3504 (64-bit)
3.5.3504\\install\\E633C1D\\"
...
"UninstallString"=hex(2):4d,00,73,00,69,00,45,00,78,00,65,00,63,00,2e,00,65,00,
\

78,00,65,00,20,00,2f,00,49,00,7b,00,35,00,43,00,41,00,34,00,39,00,41,00,44,\

00,46,00,2d,00,39,00,43,00,31,00,41,00,2d,00,34,00,33,00,33,00,32,00,2d,00,\

42,00,35,00,41,00,44,00,2d,00,46,00,35,00,31,00,32,00,42,00,45,00,36,00,33,\
00,33,00,43,00,31,00,44,00,7d,00,00,00
...

(Apparently some are stored in a 16-bit encoding...)
Post by Terry Reedy
bs = """4d,00,73,00,69,00,45,00,78,00,65,00,63,00,2e,00,65,00,
...
78,00,65,00,20,00,2f,00,49,00,7b,00,35,00,43,00,41,00,34,00,39,00,41,00,44,
...
00,46,00,2d,00,39,00,43,00,31,00,41,00,2d,00,34,00,33,00,33,00,32,00,2d,00,
...
42,00,35,00,41,00,44,00,2d,00,46,00,35,00,31,00,32,00,42,00,45,00,36,00,33,
... 00,33,00,43,00,31,00,44,00,7d,00,00,00"""
Post by Terry Reedy
bl = [int(b, 16) for b in bs.split(",")]
c = "".join([chr(b) for b in bl if b > 0])
c
'MsiExec.exe /I{5CA49ADF-9C1A-4332-B5AD-F512BE633C1D}'
... compared to ...

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\1760-01
18-5542-0450]
"DisplayName"="SimSmith 16.3"
"DisplayIcon"="C:\\Program Files\\SimSmith\\.install4j\\installer.ico"
"UninstallString"="\"C:\\Program Files\\SimSmith\\uninstall.exe\""
"Publisher"="ae6ty"



--
Wulfraed Dennis Lee Bieber AF6VN
***@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/
Barry Scott
2020-04-01 20:53:02 UTC
Permalink
Post by Dennis Lee Bieber
Post by Terry Reedy
To clarify, the pydev/python.org installer does not use msi. I don't
know that anyone else does. And if someone did, why do you think it
would also uninstall the current installation?
Because, if you did find an MSI installer, and installed the same
version /over/ the existing install (same directory), then the MSI
uninstall would be removing contents from that directory.
And then you will have a registry that knows about 2 installs only one of which you can remove.
This is not a good idea.

Barry
Barry Scott (Barry Scott)
2020-04-01 09:53:02 UTC
Permalink
Post by Dennis Lee Bieber
Post by Terry Reedy
To clarify, the pydev/python.org installer does not use msi. I don't
know that anyone else does. And if someone did, why do you think it
would also uninstall the current installation?
Because, if you did find an MSI installer, and installed the same
version /over/ the existing install (same directory), then the MSI
uninstall would be removing contents from that directory.
And then you will have a registry that knows about 2 installs only one of which
you can remove.
This is not a good idea.

Barry

Loading...