程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Learn Python from official documents: Interpreter and IDE

編輯:Python

One 、 Interpreter


Python  The interpreter can execute  .py  text file , Run the desired results . Because of the whole  Python  Language is open source from specification to interpreter , So as long as the level is high enough , Anyone can write  Python  Interpreter .
# common  Python  Interpreter #
  • CPython:Python  Download and install the official website  Python3.x  You can get , yes  C  Language development , The most widely used .
  • IPython: be based on  CPython  An interactive interpreter on top , Enhanced interaction , The kernel is the same .CPython  use  >>>  As a prompt ,IPython  use  In[ Serial number ]:  As a prompt .
  • PyPy: Enhanced execution speed , Yes  Python  Dynamic compilation of code ( It's not an explanation ). If the code needs to be put in  PyPy  perform , Need to know  PyPy  And  CPython  The difference between .
  • Jython: Running on the  Java  On the platform  Python  Interpreter , You can directly  Python  Code compiled into  Java  Bytecode execution .
  • IronPython: and  Jython  be similar ,IronPython  It's running at Microsoft  .Net  Platform interpreter , Can be  Python  Code compiled into  .Net  Bytecode .

Be careful : and  Java  or  .Net  Platform interaction , The best way is not to choose  Jython  or  IronPython, It is used to interact through network calls , Ensure the independence between procedures .

1、 stay  Windows  Installation on  Python


Go to  Python  Official website -Python Releases for Windows  Download the installer . among ,executable  For executable , Use after installation ,embeddable  For embedded , The version that can be used after decompression ( Remember to add the path of the interpreter to the environment variable , otherwise  PyCharm  Unable to get interpreter position automatically ).

Open the download  exe  function ,  Check  Add Python 3.9 to Path, And click the  Install Now  Complete the installation .


Win+R  key , Input  cmd  Call up the command prompt , Input  python  You can enter the interpreter . It can be executed  exit()、quit()、ctrl+z  Or close the window directly , Exit interpreter . It can be executed  python -V  or  python --version, see  Python  edition .

2、 stay  Mac  Installation on  Python


MAC 10.9  And above operating systems come with  Python2.7  Environmental Science . If you want to install a newer version , You can go to  Python  Official website -Python Releases for Windows  Download and install . If installed  Homebrew, You can go directly through  brew install python3  install .

3、 stay  Linux/Unix  Installation on  Python


Go to  Python  Official website -Python Source Releases  Download and unzip , If you need to customize some options to modify  Modules/Setup, With  Python3.6.1  Version as an example .
# tar -zxvf Python-3.6.1.tgz
# cd Python-3.6.1
# ./configure
# make && make install

Check  Python3  Is it working properly :
# python3 -V
Python 3.6.1

Two 、IDE(Integrated Development Environment)

1、IDLE


stay  Python  Download and install the interpreter on the official website , Will automatically get  IDLE, You can search directly in the start menu  IDLE.


2、PyCharm


JetBrains  Made of  Python IDE, Support  macOS、 Windows、 Linux  System , With commissioning 、 Syntax highlighting 、Project management 、 Code jump 、 Smart tips 、 Done automatically 、 Unit testing and version control . You can go to  PyCharm  Official website - download  PyCharm  Download and install .
After downloading and installing successfully, open  PyCharm, Click on  New Project, Refer to the following figure to complete the creation and operation .



3、VSCode


VSCode(Visual Studio Code) Is a cross platform free source code editor developed by Microsoft ,VSCode  The development environment is very simple and easy to use . You can go to  Visual Studio Code  Official website   Download and install , Open after installation  VSCode  continue installation  VS Code Python  Expand



If you have any questions in the reading process , Welcome to leave a message in the comments area to participate in the discussion !
  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved