Python环境搭建
liferecords软件安装
1. Anaconda/miniconda
Anaconda官网: anaconda
Miniconda官网: miniconda
Anaconda安装包: Anaconda3-2022.05-Windows-x86_64.exe
Miniconda安装包: Miniconda3-latest-Windows-x86_64.exe
2. Pycharm/VSCode
Pycharm官网:pycharm
VSCode官网:vscode
Pycharm安装包:pycharm-community-2022.1.1.exe
VSCode安装包:VSCodeUserSetup-x64-1.67.2.exe
3. 搭建环境
-
创建/删除虚拟环境
1
2
3
4# 创建虚拟环境
conda create -n env_demo python=3.8
# 删除虚拟环境
conda remove -n env_demo -
激活/退出环境
1
2
3
4# 激活环境
conda activate env_demo
# 退出环境
conda deactivate env_demo -
安装依赖
1
2
3
4
5
6
7
8
9
10# 通过文件安装库
pip install -r requirement.txt
# 通过pip安装某个库
pip install xxx
# 通过conda安装某个库
conda install xxx
# 通过pip卸载库
pip uninstall xxx
# 通过pip卸载库
conda uninstall xxx -
推荐库
1
conda install jupyter-notebook