Python installation (MacOS)

1. Open the URL  Welcome to Python.org

2. Click to download downloads (latest version on July 3, 2023: 3.11.4)

Click on macOS, as shown in the picture

 Clicking will jump to another interface, slide to the end

Click to install (64-bit)

3. After getting a pkg installation package, double-click to open it and install it all the way.

4. Enter python3 in the terminal to query the version number.

(ps: Didn’t you see the three arrows! You can write python code here, such as our Hello World):

5. You can find it by typing python in Windows. How can you make it work with MAC? (Create an alias)

 

Terminal input:

echo 'alias python="python3"' >> .bash_profile

 6. Enter python 

Guess you like

Origin blog.csdn.net/m0_51965101/article/details/131510623