直接執行安裝命令
$ 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
