简体   繁体   English

Python IDLE不起作用,因为缺少python.exe

[英]Python IDLE doesn't work because python.exe is missing

When I try to open .py files with IDLE (right click and "edit with IDLE"), Windows will ask whether to use python.exe to open this file. 当我尝试用IDLE打开.py文件时(右键单击并用IDLE编辑),Windows将询问是否使用python.exe打开此文件。 If I choose python, IDLE won't start properly. 如果选择python,IDLE将无法正常启动。

If I use "open with" and navigate to Python27\\Lib\\idlelib\\idle.bat I'll get an error: 如果我使用“打开方式”并导航至Python27\\Lib\\idlelib\\idle.bat ,则会收到错误消息:

Windows cannot find 'C:\\Python27\\Lib\\idlelib....\\pythonw.exe Windows无法找到'C:\\ Python27 \\ Lib \\ idlelib .... \\ pythonw.exe

If I start IDLE from start menu, Windows will open the installer and say "Please wait while Windows configures Python 2.7.13 (64-bit)" and if I have the Python installation file available, it will say "Error writing to file C:\\Python27\\pythonw.exe" . 如果从开始菜单启动IDLE,Windows将打开安装程序并显示"Please wait while Windows configures Python 2.7.13 (64-bit)" ,如果我有可用的Python安装文件,它将显示"Error writing to file C:\\Python27\\pythonw.exe"

Starting IDLE from CMD (eg. >> python.exe C:\\Python27\\Lib\\idlelib\\idle.py ) works normally. 从CMD启动IDLE(例如>> python.exe C:\\Python27\\Lib\\idlelib\\idle.py )可以正常工作。

I don't see pythonw.exe under C:\\Python27\\ . 我在C:\\Python27\\下看不到pythonw.exe Should it be there and how would it delete itself? 它应该在那里并且如何删除自己吗?

I'm using Windows 10 and this issue started a while back. 我使用的是Windows 10,这个问题是从前一段时间开始的。 I did a complete reinstall of python and packages and the issue was fixed for a short while, but it returned today. 我完全重新安装了python和软件包,此问题已解决了片刻,但今天又恢复了。

Okay, I've installed Process Monitor and set up filters to monitor the Python folder. 好的,我已经安装了Process Monitor并设置了过滤器来监视Python文件夹。 Turns out Avast has been busy deleting pythonw.exe for a couple of months now. 事实证明,Avast已经忙于删除pythonw.exe几个月了。

It happened sparsely in the beginning, but last 12 deletes were from the past few days. 它最初很少发生,但是最近几天删除了最后12个。

FIXED 固定

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM