(豆瓣源)pip install xxx -i http://pypi.douban.com/simple
或者 pip3 install xxx -i http://pypi.douban.com/simple(有的时候pip会报错,比如在pip爬虫的一些库时候,这时候如果你的python时3.x的版本就需要用到pip3)
或者 pip install xxx==x.x.x(版本号) -i http://pypi.douban.com/simple
豆瓣源的速度其实是比清华源的速度要快的,比如在安装tensorflow时候。
同理清华源也一样
(清华源)pip install xxx -i https://pypi.tuna.tsinghua.edu.cn/simple