【发布时间】:2020-08-27 04:59:00
【问题描述】:
我目前正在改进软件的卸载程序,它还会在其旁边安装 Python (2.7.18)。
软件本身安装在这样的位置:D:\X,并使用子文件夹中的 Python:D:\X\python
在软件安装过程中安装python,Python.msi文件是这样调用的:python-2.7.18.msi /qn INSTALLDIR=D:\X\python TARGETDIR=D:\X\python ALLUSERS=1
过去使用的是较旧的 python 版本。我的实际问题是,例如当我尝试卸载并使用不同或旧版本重新安装时 - 我可能会遇到 python 版本冲突,因为卸载程序不会卸载,而只会删除 python 文件夹
在卸载我的软件的过程中,我必须从该位置卸载 Python 解释器。
我只是尝试了python-2.7.18.msi /uninstall,然后弹出一条错误消息
我还尝试了安装过程中的路径参数(我在文档中找不到):python-2.7.18.msi /uninstall INSTALLDIR=D:\X\python TARGETDIR=D:\X\python ALLUSERS=1
无论我尝试什么,卸载程序都会弹出此错误消息(德语):
我还通过python-2.7.18.msi /lv log.txt /uninstall获取了详细日志:
MSI (c) (E8:D4) [16:43:14:912]: Unable to create a temp copy of patch 'CURRENTDIRECTORY="D:\X\python"'.
Das Updatepaket konnte nicht geöffnet werden. Stellen Sie sicher, dass das Updatepaket vorhanden ist und dass Sie darauf zugreifen können, oder wenden Sie sich an den Hersteller, um sicherzustellen, dass es sich um ein gültiges Updatepaket handelt.
D:\X\python\python-2.7.18.msi
MSI (c) (E8:D4) [16:43:14:912]: Note: 1: 1708
MSI (c) (E8:D4) [16:43:14:912]: Product: Python 2.7.18 -- Installation failed.
MSI (c) (E8:D4) [16:43:14:912]: Windows Installer installed the product. Product Name: Python 2.7.18. Product Version: 2.7.18150. Product Language: 1033. Manufacturer: Python Software Foundation. Installation success or error status: 1635.
MSI (c) (E8:D4) [16:43:14:928]: MainEngineThread is returning 1635
=== Verbose logging stopped: 11.05.2020 16:43:14 ===
日志告诉我没有有效的更新包并且安装失败。 这里的更新包是什么意思?我确实有来自 python.org 的有效 Python.msi 文件
重要提示:手动打开 MSI 文件并单击 GUI 时 - 卸载没问题! 这种情况只有在通过 CLI 卸载时才会出现!
我是否使用了错误的卸载程序?卸载过程中是否存在真正的错误?
所有命令均以完全本地管理员权限执行
非常感谢任何帮助
【问题讨论】:
-
没时间详细看这个,这里有一个链接可以查看:Uninstall MSI。
标签: python windows python-2.7 windows-installer uninstallation