zoukankan      html  css  js  c++  java
  • OSX下 pip更新及安装python库

    直接执行安装命令

      $ pip install builtwith

    提示pip当前版本为7.1.2,要使用"pip install --upgrade pip"升级到8.1.2

      $ pip install --upgrade pip

    报错如下:

      Cannot fetch index base URL https://pypi.mirrors.ustc.edu.cn/simple/

    提示信息表示找不到镜像网站,有可能是镜像源失效了,或者国外的源被墙了。修改为国内可访问的源

      $ vim ~/.pip/pip.conf

    此处使用的是阿里云的镜像

    [global]
    index-url = http://mirrors.aliyun.com/pypi/simple/
    [install]
    trusted-host = mirrors.aliyun.com

    trusted-host一定要设置,不然会报错:

    The repository located at mirrors.aliyuncs.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with ‘–trusted-host mirrors.aliyuncs.com’.

    再次执行升级命令(需要加sudo,否则会出错,对相关文件没有访问权限)

      $ sudo pip install --upgrade pip

    升级OK!

    安装python库(需要加sudo)

      $ sudo pip install builtwith

  • 相关阅读:
    高性能JavaScript
    高性能CSS
    去掉超链接文字点击后的灰色框
    高性能HTML
    css整站规划
    css hack 和问题
    IE6支持min-width、max-width CSS样式属性
    WPF草稿
    正则表达式学习日记zz
    详解Adorner Layer(zz)
  • 原文地址:https://www.cnblogs.com/techroad4ca/p/5922389.html
Copyright © 2011-2022 走看看