zoukankan      html  css  js  c++  java
  • pip安装时速度慢,怎么办?

      如果你是一个python开发使用者,经常会用到pip去安装一些模块或者工具,pip是很强大的模块安装工具,但是由于国外官方pypi经常被墙,导致不可用,所以我们最好是将自己使用的pip源更换一下,这样就能解决被墙导致的装不上库的烦恼。

      国内镜像源:

    
    新版ubuntu要求使用https源,要注意。
    
    清华:https://pypi.tuna.tsinghua.edu.cn/simple
    
    阿里云:http://mirrors.aliyun.com/pypi/simple/
    
    中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
    
    华中理工大学:http://pypi.hustunique.com/
    
    山东理工大学:http://pypi.sdutlinux.org/ 
    
    豆瓣:http://pypi.douban.com/simple/

      使用举例:

      比如我要安装 jupyter

      可以在使用pip的时候加参数-i https://pypi.tuna.tsinghua.edu.cn/simple 

      #/usr/bin/pip install  -i   https://pypi.tuna.tsinghua.edu.cn/simple jupyterlab ,速度应该快了不少。



      

      永久修改,一劳永逸:

        Linux下,修改 ~/.pip/pip.conf (没有就创建一个文件夹及文件。文件夹要加“.”,表示是隐藏文件夹)

        内容如下:

    [global]
    index-url = https://pypi.tuna.tsinghua.edu.cn/simple
    [install]
    trusted-host=mirrors.aliyun.com

      

    付出是用来忘记的,回报时悄然而至的。不要让梦想,只是梦想!!!
  • 相关阅读:
    PHP上传文件到阿里云OSS,nginx代理访问
    知识点
    WEB安全----XSS和CSRF
    note3
    linux crontab 执行任务(7秒执行)
    composer的自动加载机制(autoload)
    php-fpm的执行方式 (进程管理模式)
    CSS3:pointer-events | a标签禁用
    CSS3: @font-face 介绍与使用
    css公共样式 | 标签元素初始化
  • 原文地址:https://www.cnblogs.com/SliverLee/p/13205363.html
Copyright © 2011-2022 走看看