我像这样编写一个代码test.py:
导入声音文件打印(“导入成功”)当我尝试在Windows 7上运行时,我只能通过cmd成功运行python test.py但我不能用双重运行它…
THX到@BoarGules,使用
where python
在cmd。 我在regedit HKEY_CLASSES_ROOT \ Python.File \ shell \ open \ command中将python路径从python2.7替换为python3。 然后双击工作!