在notepad ++中运行python脚本不起作用,其他帖子不起作用

问题描述 投票:0回答:1

最近,(半小时前)我将Notepad ++下载到代码而不是IDLE。

只是为了看看是否一切正常,我创建了这个简单的程序进行测试

def test():
    print("hello")

test()

我跑了,然后一个窗户打开并立即关闭。

假设我遇到问题的答案就在这里:How to Execute a Python File in Notepad ++?我按照说明操作,我尝试了它并且它没有用。然后我使用shift-RBM复制文件路径而不是页面上的内容,并且仍然像以前一样出现错误消息:

The system cannot find the file specified.
An attempt was made to execute the below command.
-------------------------------------------------
Command: C:\Users\----\Desktop\Python
Arguments: 3.5\Python 3.5 (32-bit).Ink
"C:\Users\----\Desktop\test.py" -i
Error Code: 2
-------------------------------------------------

在此之后,我来到这里并问了这个问题。对不起,如果答案在其他地方说或显而易见。

python notepad++ python-3.5
1个回答
0
投票

看起来你在某些文件夹名称中有空格。

要解决这个问题,你需要使用“python路径之前和之后”。

例:

"C:\Users\----\Desktop\Python 3.5\Python 3.5 (32-bit).Ink" "C:\Users\----\Desktop\test.py" -i
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.