安装和配置环境变量
https://www.cnblogs.com/xiaowangabc/articles/19035805
使用Anaconda
查看当前环境的信息
conda info

创建python虚拟环境
conda create -n “环境名” python=”python版本”
conda create -n python3.8.2 python=3.8.2
查看已经创建的所有虚拟环境
conda info -e

激活环境,退出环境
激活环境:
conda activate “环境名称”
conda activate python3.8.2

退出环境,回到普通终端:
conda deactivate
切换python解释器的位数
默认是64位的
切换到32位
set CONDA_FORCE_32BIT=1

切换到64位
set CONDA_FORCE_32BIT=0

2.5下载和删除第三方库
下载库:
在对应环境内使用pip下载
pip install “库名”
pip install pymysql

删除库:
pip uninstall “库名”
pip install pymysql
查看当前安装的所有库:
pip list
删除指定虚拟环境
conda remove -n “环境名” –all
conda remove -n python3.8.2 --all
pip换源
pip install xxx -i 加源
- 清华大学:https://pypi.tuna.tsinghua.edu.cn/simple
- 阿里云:https://mirrors.aliyun.com/pypi/simple/
- 中国科技大学:https://pypi.mirrors.ustc.edu.cn/simple/
- 华为云:https://mirrors.huaweicloud.com/repository/pypi/simple/
github项目创建指定python环境
建议为github所有python项目都单独创建一个环境,并为此命名
