因爲 Python 服務器在國外,所以使用 pip 安裝第三方模塊或者庫的時候,下載速度特別慢,常常出現以下報錯:python
$ socket.timeout: The read operation timed out
爲提高下載速度,可使用國內鏡像下載,經常使用的國內鏡像有:服務器
豆瓣socket
阿里雲阿里雲
清華大學code
中國科技大學ip
使用方法爲在 pip 命令後加 -i URL 方法,以從阿里雲下載 pandas 庫爲例:get
$ pip install pandas -i https://mirrors.aliyun.com/pypi/simple