Skip to content

zhengjiaao/Python3-Root

Repository files navigation

Python3 基础学习

Python3 基础学习进展是根据python3 菜鸟教程步骤进行的。

基础环境

安装Python和虚拟环境

确保你已经安装了Python 3.8或更高版本。你可以从Python官方网站下载并安装。

1.创建虚拟环境

cd Python3-Root

python -m venv .venv

2.激活虚拟环境

  # Windows:
  .venv\Scripts\activate
  # macOS/Linux:
  source .venv/bin/activate

3.安装Python依赖

cd example
pip install -r requirements.txt
# or 
pip install package-name

4.简单示例

创建文件:main.py

# This is a sample Python script.

# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.


def print_hi(name):
    # Use a breakpoint in the code line below to debug your script.
    print(f'Hi, {name}')  # Press Ctrl+F8 to toggle the breakpoint.


# Press the green button in the gutter to run the script.
if __name__ == '__main__':
    print_hi('PyCharm')

About

Python 3.x 技术预研框架

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published