一、构建虚拟环境
1、打开终端
2、进入指定路径
cd D:\software\pycharm\project\other_venv
3、创建虚拟环境(名称为excel)
python -m venv excel
二、创建解释器
三、添加所需模块
1、重新添加一个终端
2、安装模块
pip install xlrd==1.2.0 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
3、卸载模块
pip uninstall xlrd
4、使用requirements.txt
安装模块
pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
四、打包
1、进入打包文件夹打包