山东食品行业网站开发,电子商务网站总体框架设计,网站建设项目开发书,免费网址域名针对pip install 安装包下载慢的问题#xff0c;主要pip install直接安装是从国外拉取安装包。 解决办法#xff0c;加国内镜像#xff0c;比如百度 https://mirror.baidu.com/pypi/simple
pip install lac -i https://mirror.baidu.com/pypi/simple比如清华镜像#xf…针对pip install 安装包下载慢的问题主要pip install直接安装是从国外拉取安装包。 解决办法加国内镜像比如百度 https://mirror.baidu.com/pypi/simple
pip install lac -i https://mirror.baidu.com/pypi/simple比如清华镜像https://pypi.tuna.tsinghua.edu.cn/simple
pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple如何加快pip下载的速度 pip 之所以慢是因为它默认使用的国外的统一的下载源所以要想加快pip的下载速度可行的办法就是切换下载源为国内国内一些大公司也提供了对应的竞相网站。 国内镜像网站 阿里云 http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/ 豆瓣(douban) http://pypi.douban.com/simple/ 清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/ 中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/ 使用方法 pip install [包名] -i [ftp站名地址] --trusted-host [ftp站点名]
1 以安装numpy为例如果使用 阿里的源可以这样输入命令 pip install numpy -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
1 如果使用 豆瓣的源可以这样输入命令 pip install numpy -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
1 其他类似… 如果想一劳永逸或许可以这样 alias pyinstallpip install -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
1 将这个alias 放到 /etc/bash.bashrc 或者~/.bashrc中 以后调用pyinstall 时就可以不再加后面的参数,而且也省了 install 这个单词。