To set the version of the Python interaction command that is started in the Terminal window in the Pycharm software

Source: Internet
Author: User
to set the version of the Python interaction command that is started in the Terminal window in the Pycharm software

python2 and Python3 are very different, using the program written by Python2 , if the use of Python3 can not run; use Python3 The program you write, if you use python2 , is not running.

I have two versions of Python2 and python3 on my computer. and Python3 added to the environment variable, and python2 didn't add the environment variable inside.
And we want to start the python2 or python3 Interactive terminal in cmd (that is, Terminal, Chinese for: terminal ) The execution commands are: Python.

Every time I Terminal a window in the Pycharm software or in the cmd command line interface , I execute the python command, which starts with the Python3 interface: in PYC Harm software in the Terminal window

In the cmd command line interface

So here's the question:

Q: in the pycharm Software Terminal window or in the cmd command line interface , I now want to start the python2 Interactive terminal, how to operate.

A: very simply, execute the following command to:

C:\python27\python.exe

as shown in the picture: in the Terminal window in the Pycharm software

In the cmd command line interface

Summary:

If two different executable programs use the same name, then the absolute path is used when executing them.

Related Article

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.