Python pip生成、下载、安装、卸载依赖

2024-08-02

生成依赖

pip freeze > requirements.txt


下载依赖

pip download -d ./packages -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt (-d、-i可以不填)


安装依赖

pip install --no-index --find-links=./packages -r ./requirements.txt


卸载依赖

pip uninstall -y -r requirements.txt