Python Class 1
Python Class 1
Class 1
Today’s Objectives
• Preliminary introduction to Python and related concepts
• Install Anaconda
• Install packages
• Install PyCharm
• Create a Python file in PyCharm and obtain help files for packages
Page.1
Introduction to Python-related concepts
• Python
• A high-level, general-purpose programming language.
• The latest version is Python 3.12.2. Make sure your version is Python 3.x.
• In this class, we install Anaconda instead of downloading Python directly from the official website.
• Anaconda
• A comprehensive distribution of Python bundled with a wide range of tools, libraries, and packages.
• Libraries and packages: Collections of modules that offer a wide range of functions.
• Examples: numpy, pandas, math, matplotlib, seaborn, sklearn……
• We will explore PyCharm in this class, but other IDEs are also optional for programming.
Page.3
Install Anaconda
• https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/ (Recommended)
• https://www.anaconda.com/download
Page.4
Install Anaconda
Page.5
Install Anaconda
Page.6
Install Anaconda
• If Anaconda3 was not automatically added to your PATH environment variable for any reason, please refer to
https://blog.csdn.net/m0_61607990/article/details/129531686 for manual steps to set up the environment.
Page.7
Install Packages
• Open a command-line interface:
• Windows: Press Windows+R, then key in ‘cmd’ in the popup window.
• Mac: Click the Launchpad icon in the Dock, type Terminal in the search field, then click Terminal.
Or, In the Finder, open the /Applications/Utilities folder, then double-click Terminal.
• Anaconda Prompt
• conda list, conda install Package, conda update –all, conda update conda, conda remove Package
Page.8
Install PyCharm
• https://www.jetbrains.com/pycharm/download
Page.9
Explore PyCharm
• Explore the Settings in the main menu
• Keymap: Check or change shortcut keys
• Editor - File and Code Templates: Add descriptive notes on the top of every Python file
Page.11
Explore PyCharm
• Create a Python file within the project
• Right-click the project name – New – Python File
Page.12
See you next week