Home  >  Q&A  >  body text

python3.x - When using the batch start command to run a specified Python script, as long as the path or name of the Python script contains Chinese characters, it cannot be executed. How to solve it?

All the following commands can be successfully entered and executed directly in the cmd window, but some will fail when executed after being saved into a .bat file
1.start Python C:\English\test.py (Success)
2.start Python C:\English\test中文.py(Failure)
3.start Python C:\中文\test.py(failed)
4.start Python C:\中文\test中文.py(failed)

typechotypecho2655 days ago896

reply all(1)I'll reply

  • 女神的闺蜜爱上我

    女神的闺蜜爱上我2017-06-12 09:29:29

    You can try using quotation marks

    start "Python C:\中文\test.py"

    reply
    0
  • Cancelreply