- 批量下载指定python版本、指定架构whl及其所有依赖:
| |
| pip download --python-version 3.9 --only-binary :all: -d ./aarch64-python3.9.13-whls -r requirement.txt -i https://pypi.tuna.tsinghua.edu.cn/simple --platform manylinux2014_aarch64 --platform manylinux_2_17_aarch64 --platform none |
| |
| |
| pip download --python-version 3.7.6 --only-binary :all: -d ./x86_64-python3.7.6-whls-need -r requirement.txt -i https://pypi.tuna.tsinghua.edu.cn/simple -i https://mirrors.aliyun.com/pypi/simple/ --platform manylinux_2_17_x86_64 --platform manylinux2014_x86_64 --platform manylinux2010_x86_64 --platform none |
| |
| |
| pip download --python-version 3.10 --only-binary :all: -d ./amd64-python3.10-whls -r requirement.txt -i https://pypi.tuna.tsinghua.edu.cn/simple --platform win_amd64 --platform none |
| |
| |
| pip download cvxpy==1.5.0 --python-version 3.10 --only-binary :all: -d ./amd64-python3.10-whls -i https://pypi.tuna.tsinghua.edu.cn/simple --platform win_amd64 |
- python安装pip:使用源码安装setuptools,再安装pip
| |
| pip install xxx.whl --no-index |
| |
| pip install xxx.whl --no-index -f /path/to/your/whls |
| |
| pip install xxx=1.1.0 --no-index --ignore-installed -f /path/to/your/whls |
| |
| pip install --no-index --ignore-installed -f /path/to/your/whls -r /path/to/your/requirement.txt |
| |
| pip install --no-index --no-deps xxx.whl |
| pip list --format freeze > requirement.txt |
- 导出依赖包(需要指定当前已经下载的目录,否则只能重新下载)
| pip download -r requirement.txt -d ./ -f /path/to/your/downloaded/wheels/or/source/ --no-index |
| pip list | tail -n +3 | awk '{print $1}' | xargs ../../bin/pip uninstall -y |
-
anaconda安装目录anaconda/pkgs
下都是编译好的模块,包括python,可以直接copy使用,注意要添加模块搜索路径到python-xxx/lib/python3.9/site-packages/easy-install.pth
-
查看python模块依赖关系:使用pipdeptree
-
查看python模块版本:pip show module_name
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?