對于python中pip安裝庫檔案超時問題
找了好多方法,發現更換安裝源最適合我
方案一:對于比較小的庫,可以延時處理
-------- pip --default-timeout=100 install -U pip
-------- pip --default-timeout=100 install 第三方庫名
方案二:更換安裝源
http://pypi.sdutlinux.org/simple/ 山東理工大學
http://pypi.hustunique.com/simple/ 華中理工大學
http://pypi.mirrors.opencas.cn/simple/ 中國科學院
阿里云 http://mirrors.aliyun.com/pypi/simple/
中國科技大學 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣 http://pypi.douban.com/simple/
清華大學 https://pypi.tuna.tsinghua.edu.cn/simple/
例如tkinter:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tkinter
永久設定
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
方案三:下載離線包
python所有庫:(https://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml)
---------然后通過pip install 保存路徑/加上下載的檔案名 進行安裝
(如pip install C:\Users\HP\Desktop\scikit_image-0.14.1-cp37-cp37m-win32.whl)
源于:https://www.cnblogs.com/zmdComeOn/p/12010111.html
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/138776.html
標籤:Python
上一篇:用pandas讀取excel
下一篇:向excel中寫入行,列
