Python can';t卸载Esky中的最新版本

Python can';t卸载Esky中的最新版本,python,esky,Python,Esky,我正在尝试使用“app.uninstall_version(v)”卸载esky中的某个版本,但执行此操作时出现以下错误: [Error 5] Access is denied. Traceback (most recent call last): File "Example.py", line 35, in EskyUpdate File "esky\__init__.pyc", line 951, in uninstall_version File "esky\__init__.p

我正在尝试使用“app.uninstall_version(v)”卸载esky中的某个版本,但执行此操作时出现以下错误:

[Error 5] Access is denied.
Traceback (most recent call last):
  File "Example.py", line 35, in EskyUpdate
  File "esky\__init__.pyc", line 951, in uninstall_version
  File "esky\__init__.pyc", line 1008, in _cleanup_bootstrap_env
  File "esky\fstransact\win32txf.pyc", line 200, in remove
  File "esky\fstransact\win32txf.pyc", line 214, in _remove
  File "esky\fstransact\win32txf.pyc", line 24, in wrapper
WindowsError: [Error 5] Access is denied.  
一旦可用,“我的程序”将安装程序的新版本,并在不同的进程中打开新版本,然后等待其退出代码。 如果退出代码等于0,则它将重新启动以运行新版本,但如果退出代码不等于0(意味着新版本中存在错误),则程序将删除新版本并继续正常运行。
代码如下:

def EskyUpdate():
if getattr(sys,"frozen",False):
    app = esky.Esky(sys.executable,"http://example.com/downloads/")
    updateVersion = app.find_update()
    if(updateVersion != None):
        app.fetch_version(updateVersion)
        app.install_version(updateVersion)
        appexe = esky.util.appexe_from_executable(sys.executable)
        exitCode = subprocess.call(appexe)#calls the new version in a different process
        if exitCode == 0:
            os.execl(appexe, *([appexe]+sys.argv))
        else:
            app.uninstall_version(updateVersion)#this is where the error occurs

当我尝试卸载新版本时,为什么会出现“访问被拒绝”错误?如何卸载新版本?

您需要管理员权限,请尝试查看:我以管理员身份运行程序,但仍然出现相同的错误,此外,我更希望在不使用管理的情况下修复此问题