婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > PIP安裝docker-compose超時問題解決方案

PIP安裝docker-compose超時問題解決方案

熱門標簽:信貸電銷機器人系統 山東電信外呼系統靠譜嗎 江蘇自動外呼系統一般多少錢 400 電話 申請費用 鸚鵡螺號航海地圖標注時間 ai電話機器人營銷 比較穩定的外呼系統 長沙回撥外呼系統 云南云電銷機器人招商

1:安裝命令

pip install docker-compose

異常信息

socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 188, in _main
status = self.run(options, args)
File "/usr/local/lib/python3.6/site-packages/pip/_internal/cli/req_command.py", line 185, in wrapper
return func(self, options, args)
File "/usr/local/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 333, in run
reqs, check_supported_wheels=not options.target_dir
File "/usr/local/lib/python3.6/site-packages/pip/_internal/resolution/legacy/resolver.py", line 179, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "/usr/local/lib/python3.6/site-packages/pip/_internal/resolution/legacy/resolver.py", line 362, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/usr/local/lib/python3.6/site-packages/pip/_internal/resolution/legacy/resolver.py", line 314, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "/usr/local/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 469, in prepare_linked_requirement
hashes=hashes,
File "/usr/local/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 259, in unpack_url
hashes=hashes,
File "/usr/local/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 130, in get_http_url
link, downloader, temp_dir.path, hashes
File "/usr/local/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 281, in _download_http_url
for chunk in download.chunks:
File "/usr/local/lib/python3.6/site-packages/pip/_internal/cli/progress_bars.py", line 166, in iter
for x in it:
File "/usr/local/lib/python3.6/site-packages/pip/_internal/network/utils.py", line 39, in response_chunks
decode_content=False,
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py", line 564, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py", line 529, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib64/python3.6/contextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py", line 430, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

網上有網友說加上超時時間,但并沒有解決我這個問題。

pip --default-timeout=100 install docker-compose

這個應該是沒有翻墻導致下載超時。所以需要修改pip 的源

按照網上例子,臨時修改了pip的源,再次執行安裝命令,也沒有解決我的問題

[root@localhost bin]# pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple/

后來又看到一篇博客,這種方式解決了我的問題,修改源借鑒的是https://blog.csdn.net/h106140873/article/details/103858931 博客。

1:在根目錄下創建pip文件夾(我是使用的root用戶)

mkdir ~/.pip

2:在 .pip目錄中創建 pip.conf文件

touch pip.conf

3:編輯 pip.conf 文件,添加如下兩行內容

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

再次執行 pip --default-timeout=100 install docker-compose 命令,安裝成功。并且下載速度很快

注:pip國內的一些鏡像

阿里云 http://mirrors.aliyun.com/pypi/simple/
中國科技大學 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清華大學 https://pypi.tuna.tsinghua.edu.cn/simple/
中國科學技術大學 http://pypi.mirrors.ustc.edu.cn/simple/

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。

標簽:嘉興 烏海 衡陽 拉薩 亳州 澳門 齊齊哈爾 運城

巨人網絡通訊聲明:本文標題《PIP安裝docker-compose超時問題解決方案》,本文關鍵詞  PIP,安裝,docker-compose,超時,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《PIP安裝docker-compose超時問題解決方案》相關的同類信息!
  • 本頁收集關于PIP安裝docker-compose超時問題解決方案的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 福海县| 阿坝县| 恭城| 泾阳县| 延边| 察隅县| 光泽县| 新竹县| 凤台县| 长沙市| 罗甸县| 溆浦县| 南充市| 玛曲县| 会泽县| 沙河市| 兰坪| 化德县| 海门市| 道真| 佛教| 右玉县| 新河县| 昭平县| 策勒县| 会理县| 分宜县| 平塘县| 婺源县| 昔阳县| 崇左市| 马关县| 石楼县| 昌图县| 广汉市| 明光市| 建阳市| 阿鲁科尔沁旗| 丹棱县| 大埔县| 大洼县|