Home  >  Q&A  >  body text

When python opens a .py file, it appears that window cannot open the file. Why?

I just started to get into python, please help me to answer it~Thank you

世界只因有你世界只因有你2710 days ago816

reply all(3)I'll reply

  • 某草草

    某草草2017-05-18 10:57:30

    According to your second picture, select 从已知列表中选择安装程序.默认的话,安装程序目录在C:/用户/username(你的)/Appdata/Local/programs/python/python.exe and choose which program you want. If not, find the program path name and set it yourself.

    or from cmd进入程序所在目录,参考CMD命令进入某个目录,执行python hello.py.

    reply
    0
  • 仅有的幸福

    仅有的幸福2017-05-18 10:57:30

    If it cannot be opened by double-clicking, it means that the default opening program is not set. Set it to python to open it for execution, or set it to open it as an editor

    reply
    0
  • 大家讲道理

    大家讲道理2017-05-18 10:57:30

    Python’s bin directory is not added to the environment variable

    reply
    0
  • Cancelreply