[英]How to i make my python files go back to normal?
So i'm using python3.4, but decided to try out 2.7. 所以我正在使用python3.4,但决定尝试2.7。 Bad idea.
馊主意。 When i installed python 2 all of my python files started opening with python 2 IDLE, which wasn't really my plan.
当我安装python 2时,我所有的python文件都开始使用python 2 IDLE打开,这并不是我的计划。 I then decided to uninstall python 2 again and i figured that now it should go back to normal.
然后,我决定再次卸载python 2,我认为现在应该可以恢复正常了。 It didn't.
没有。
The files now wanted to open as pyWin instead of python 3. I changed the "open as" and tried put it to idle. 现在,这些文件要以pyWin而不是python 3打开。我更改了“ open as”并尝试使其处于空闲状态。 Now the problem is that it always opens as idle, and there is no icon.
现在的问题是它始终以空闲状态打开,并且没有图标。 Usually you get the option "open as idle" when you right click on it, and you get the console when you double click.
通常,当您右键单击时,会得到“以空闲方式打开”选项,而双击时会得到控制台。 Now it opens as idle even if i double click on it, which i don't want.
现在,即使我双击它,它也会以空闲状态打开,这是我不想要的。 Now i don't know how to make it go back to normal.
现在,我不知道如何使其恢复正常。 I tried searching on the internet, but it only told me to set the "open as" to idle, which doesn't do what i want.
我尝试在Internet上搜索,但只告诉我将“打开方式”设置为空闲,这并不能满足我的要求。
I don't know if this got messy, let me know if there is anything i need to clearify. 我不知道这是否混乱,请让我知道是否需要澄清。
So, the problem is the interpreter. 因此,问题出在解释器上。 On a Linux machine i'd suggest du edit/add the shebang line.
在Linux机器上,我建议您编辑/添加shebang行。
But this looks like Windows to me. 但这对我来说就像Windows。 I guess the easiest solution would be to reinstallt Python3.X in the prefered version.
我猜最简单的解决方案是在首选版本中重新安装Python3.X。 This should overwrite the PATH variables.
这应该覆盖PATH变量。
EDIT: I havent had this problem yet, this solution just sounds logicle to me. 编辑:我还没有这个问题,这个解决方案对我来说听起来很合逻辑。
Re-set the file association. 重新设置文件关联。 In a
cmd.exe
window, give the following commands. 在
cmd.exe
窗口中,输入以下命令。
assoc .py=Python.File
ftype Python.File="C:\path\to\python3.exe" "%1" %*
In the ftype
command, you should use the proper path to your Python 3 executable. 在
ftype
命令中,应该使用正确的Python 3可执行文件路径。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.