國內(nèi)鏡像安裝三方包格式:
pip install 工具包名稱 -i HTTPS://****/ --trusted host-
eg:(安裝numpy使用豆瓣鏡像)
pip install numpy -i HTTPS://pypi.doubanio.com/simple/ --trusted host-
-
window 配置pip默認鏡像
- 打開appdata文件夾,在資源管理器的地址欄輸入%appdata%后回車;
- 新建一個pip文件夾,在pip文件夾里面新建一個配置文件pip.ini;
- 在配置文件中輸入如下內(nèi)容后保存即可(示例為豆瓣源):
豆瓣源
[global] timeout = 6000 index-url = https://pypi.doubanio.com/simple/ trusted-host = pypi.doubanio.com清華源
[global] timeout = 6000 index-url = https://pypi.tuna.tsinghua.edu.cn/simple trusted-host = pypi.tuna.tsinghua.edu.cn
vsCode python第三方包代碼自動補全
設(shè)置,搜索autoComplete,點擊"Edit in setting.json",添加模塊路徑
"python.autoComplete.extraPaths": [
"C:/Users/Administrator/AppData/Local/Programs/Python/Python37/Lib/site-packages",
"C:/Users/Administrator/AppData/Local/Programs/Python/Python37/Scripts"
],
"python.jediEnabled": false