[Python以終為始] Day 1–安裝, IDE, run python with interpreter prompt

想研究機器學習的前端工程師,從零到一百學習python的筆記

Jingle Lin
Jiingler

--

Install

Check installation- type python in cmd

If python had not been installed:

  1. download and install
    1–1. Go to python download(For Mac) and download latest stable release(python 3.10.6)
    1–2. Typebrew install python3 at the Terminal prompt
  2. After download, type python in cmd and still shows “command cannot found: python”
  3. After researching, type python3 in cmd and that works fine!!
failed!!
success!!

Choose IDE

I have VS code experience before, so I choose VS code to be my python IDE.

Use Python interpreter prompt to run python

  1. typing python3 and pressing [return] key
  2. Once you have started Python, you should see >>> where you can start typing stuff.
  3. type print("Hello World") after >>>, and press [return], you will see Hello Worldprinted to the screen.

>>> - This is called the Python interpreter prompt.

python with first step — hello world

You are not allowed to quit the interpreter prompt with normal ctrl + c. You can use ctrl + d or type exit() and press [return] to quit the interpreter prompt.

--

--