Python离线安装包下载指南
python包下载的两种方法:
1. pypi中搜索,https://pypi.org/
例如搜索numpy,在左侧的download files中选择下载符合系统环境的whl文件
选择下载符合系统的whl文件
下载完毕后,使用pip安装下载好的whl文件
python3 -m pip install /xx/xxx/xxxx/sample/xxx.whl --no-index --find-links=/xx/xxx/xxxx/sample
如果遇到没有的包,继续去pypi中下载whl文件,并将whl文件放置在/xx/xxx/xxxx/sample中
2. 清华镜像下载,https://pypi.tuna.tsinghua.edu.cn/simple/
在网址后面加上你想要下载的包名称,例如
选择下载符合系统的whl文件
下载完毕后,使用pip安装下载好的whl文件
python3 -m pip install /xx/xxx/xxxx/sample/xxx.whl --no-index --find-links=/xx/xxx/xxxx/sample
如果遇到没有的包,继续去pypi中下载whl文件,并将whl文件放置在/xx/xxx/xxxx/sample中
参考资料:
https://blog.csdn.net/dui845819593/article/details/130148238
作者:Olafur_zbj