Why is there a different way to run. Py in cmd and PowerShell?

Source: Internet
Author: User
The original question has already known how to deal with, sorry, as a beginner there is too much to do, at the same time regardless of how the respondents, thank you for your answer. But the CMD run does not have to be written in the command of Python can open the Py python, and PowerShell does need to specify in the command Python, about the other differences, please say this bar, at the same time to say something python just learn to do something ...

Reply content:

Master has modified the problem, the original problem can look at the problem log, about the new problem, I am not very familiar with Python, it is not swim, we can refer to the other people's answer

-------------------------------------------------------------------------


Will you be dead if you look at the tips?

He didn't let you use. \rr.py, and I remember you were going to use Python to start this file. Now, the question.
$PROFILE wrote it.
$env:PATHEXT+=";.py"
The biggest problem I've ever had is coding problems. CMD and PowerShell display Chinese codepage different. If your codepage is not set well. Light text is garbled. Re-program error: Python xx.py should be a file type interface with PowerShell it is not possible to directly identify xx.py, which you can write./xx.py to recognize this script. The latter format is more consistent with the file representation under Linux and is easier to identify with the old Shell file type interface.
CMD's file interface is a little more new, you can directly identify the xx.py file, call the Python interpreter.
In fact, all written in Python xx.py is not so much trouble. Read the wrong, beg to delete
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.