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

[Python] Python installation tutorial (Shortcut version)

編輯:Python

Many beginners do not know how to install correctly Python, Simply write down .

Python There are two important versions of the language ,Python2 and Python3, There are differences in grammar between the two .Python2 It has become history , Now the whole world uses Python3 edition . So do we Python3 edition , Apply to Windows 7 and Windows 10 System .

1. download Python Installation package

Here choose the more popular  Python 3.9.0 Of 64 Bit version , Click the link below to download .

https://www.python.org/ftp/python/3.9.0/python-3.9.0-amd64.exehttps://www.python.org/ftp/python/3.9.0/python-3.9.0-amd64.exe

Other versions are available in  Download Python | Python.org  The page chooses itself .

High end computer players can also download quickly from domestic rogue download stations , Be careful not to click on some advertising links .

2.  install

Double click Install Package , Enter the installation interface . Be careful Several options must be checked . Check a few options , It can greatly reduce all kinds of inexplicable problems .

 

Wait for installation to complete ,Python The installation of is over . Now you can start writing and running Python Code. .

3.  Use Python

3.1  Use interactive commands

Find... In the application list  Python 3.9.0, Click on  IDLE . I use my own computer here Python 3.7 Screenshot of version ,Python 3.9.0 similar .

 3.2  Use code files

1) Create and save code files  

stay  IDLE  Software , Click on the  File->New File, A window similar to Notepad will pop up , Write it in it Python Code , And save it as my.py  that will do .

 

  When you need to edit the contents of the file again , Right click on the my.py , choice 【Edit with IDLE】 that will do .

2) Run code file

Use  IDLE  open my.py  After the document , Click on the menu bar Run-> Run Module, A new window will pop up , The blue in the new window is the running result of the code .

 

4.  more

Use Python  Self contained  IDLE  Tools to write and run  Python  Code. . But for the convenience of writing 、 Debugging and running code , There are more powerful and convenient tool software , such as  PyCharm  Software . Its domestic official website is PyCharm:JetBrains For professional developers Python IDEhttps://www.jetbrains.com/zh-cn/pycharm/ The software has a commercial fee version , There are also free and open source community editions . Community Edition (PyCharm Community Edition) Is a completely free version , The function is enough for beginners , Code hinting , Syntax highlighting and other basic functions are all available .

Community version download address :

Thank you for downloading PyCharm!

Installation and use are slightly complicated , It is not recommended for beginners to use .

5.  Digression

By chance  IDLE  In the  Turtle  The case code of the graphics library , And it can run directly . Let's also explain .

Turtle yes Python Self contained Drawing Kit .Turtle The English translation is turtle 、 Tortoise means , It's interesting to name a turtle . As you can imagine , There is a turtle on the beach , It uses its tail to draw lines on the beach , Climb right 10 rice , Just draw it with your tail 10 A meter long line . If you lift your tail and climb , There is no trace on the beach ( Line ), You can draw a line by putting down your tail and climbing .Turtle This is how the package's drawing function name is designed , It's very intuitive .

  Click on   Bottom  START  Run code , In the window on the right , See the turtle using its tail   draw   Yin Yang Tai Chi diagram .

 

 

 

 


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved