# hello-python **Repository Path**: sdcnljg/hello-python ## Basic Information - **Project Name**: hello-python - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-03-07 - **Last Updated**: 2025-02-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 在 python 中启用 虚拟环境步骤 ## 1 新建文件夹并进入文件夹中 例如 `mkdir hello-python && cd hello-python` ## 2 执行命令 `python3 -m venv venv` > 执行次命令之后,会在当前目录下生成 venv 目录 ## 3 执行 `source ./venv/bin/activate` 激活虚拟环境 > 正常激活之后,在终端中 每一行的前面 显示 (venv) -> 表示虚拟环境启用成功 ## 4 执行 `deactivate` 命令退出虚拟环境 # 在 Python 中安装软件 > 使用 pip 安装常用工具包,类似 node 环境中的 npm 和 yarn ## pip list 列出当前环境中安装的工具包 ``` $ pip list ``` ## pip install 工具包名称:版本 安装工具包 > 如果不指定版本,默认安装最新版本 ``` $ pip install flask ```