1. 程式人生 > >linux python3換pip 源

linux python3換pip 源

linux下python3 pip 安裝模組

# python3 -m pip  install pymysql

 

1)檢查pip.conf檔案是否存在
    >> cd ~
    >> mkdir .pip
    >> ls ~/.pip
2)直接編輯pip.conf
    sudo vi ~/.pip/pip.conf

 

[global]

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

 

[global]

timeout = 6000

index-url = http://pypi.douban.com/simple/


或者:


[install]

use-mirrors = true

mirrors = http://pypi.douban.com/simple/

trusted-host = pypi.douban.com