1.打开你的cmd命令行,用conda create -n env_name python=3.10这样的命令随便创建一个空白虚拟环境。
2.激活你那个要打包的项目的虚拟环境,然后执行python -m pip install pipreqs -i https://pypi.tuna.tsinghua.edu.cn/simple。
3.接着执行pipreqs /path/to/project --output-file /path/to/project/requirements.txt。
4.接着执行conda activate env_name。
5.接着执行python -m pip freeze > /path/to/project/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple。
6.接着执行python -m pip install pyinstaller -i https://pypi.tuna.tsinghua.edu.cn/simple。
7.接着执行pyinstaller的打包命令。
2.激活你那个要打包的项目的虚拟环境,然后执行python -m pip install pipreqs -i https://pypi.tuna.tsinghua.edu.cn/simple。
3.接着执行pipreqs /path/to/project --output-file /path/to/project/requirements.txt。
4.接着执行conda activate env_name。
5.接着执行python -m pip freeze > /path/to/project/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple。
6.接着执行python -m pip install pyinstaller -i https://pypi.tuna.tsinghua.edu.cn/simple。
7.接着执行pyinstaller的打包命令。