簡體   English   中英

如何通過http和https為conda / anaconda配置代理?

[英]How to configure a proxy for conda/anaconda both via http and https?

我當前正在使用Python (Version: 3.5.2 |Anaconda 4.2.0 (64-bit)|) 當我嘗試安裝tensorflow時,它拋出一個錯誤。 原因是我落后於代理服務器,因此我需要為conda配置代理服務器。 我看到了一些與此相關的舊帖子,但聽不懂。 誰能幫我嗎?

轉到安裝Anaconda3的目錄,創建一個.condarc類型的新文件。

在該文件中,為代理輸入以下配置

proxy_servers:
    http: http://your_proxy:port_number
    https: https://your_proxy:port_number

該文件應如下所示

在 Windows 上安裝 python 庫時出現問題:CondaHTTPError: HTTP 000 Z52BBC114E425E50E 的連接失敗<https: conda.anaconda.org anaconda win-64< div><div id="text_translate"><p> 我想安裝 pymongo 庫,但出現以下錯誤:</p><pre> (C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3) C:\Users\xxxxxxx&gt; conda install -c anaconda pymongo Fetching package metadata... CondaHTTPError: HTTP 000 CONNECTION FAILED for url &lt;https://conda.anaconda.org/a naconda/win-64/repodata.json&gt; Elapsed: - An HTTP error occurred when trying to retrieve this URL. HTTP errors are often intermittent, and a simple retry will get you on your way. ConnectTimeout(MaxRetryError("HTTPSConnectionPool(host='conda.anaconda.org', por t=443): Max retries exceeded with url: /anaconda/win-64/repodata.json (Caused by ConnectTimeoutError(&lt;urllib3.connection.VerifiedHTTPSConnection object at 0x000 00000054D6128&gt;, 'Connection to conda.anaconda.org timed out. (connect timeout=9. 15)'))",),)</pre><p> 解決的步驟:</p><pre> 1. Update C:\Users\\xxxxxxx\.condarc file with the following: channels: - defaults ssl_verify: false proxy_servers: http: http://sproxy.fg.xxx.com:1000 https: https://sproxy.fg.xxx.com:1000 2. (C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3) C:\Users\xxxxxxx&gt; conda config --set ssl_verify False</pre><p> 附加信息:</p><pre> (C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3) C:\Users\xxxxxxx&gt; conda info Current conda install: platform: win-64 conda version: 4.3.27 conda is private: False conda-env version: 4.3.27 conda-build version: 3.0.22 python version: 3.6.2.final.0 requests version: 2.18.4 config file: C:\Users\xxxxxxx\.condarc netrc file: None offline mode: False user-agent: conda/4.3.27 requests/2.18.4 CPython/3.6.2 Windows/7 W indows/6.1.7601 administrator: False</pre><p> 網上的一些帖子只是重新安裝了Anaconda,除了全新安裝還有其他選擇嗎?</p></div></https:>

[英]Issues with installing python libraries on Windows : CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/anaconda/win-64

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

相關問題 如何讓 Anaconda 在 HTTP 代理(不是 https)后面工作? 如何通過 anaconda 提示升級 conda 版本? 在 Windows 上安裝 python 庫時出現問題:CondaHTTPError: HTTP 000 Z52BBC114E425E50E 的連接失敗<https: conda.anaconda.org anaconda win-64< div><div id="text_translate"><p> 我想安裝 pymongo 庫,但出現以下錯誤:</p><pre> (C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3) C:\Users\xxxxxxx&gt; conda install -c anaconda pymongo Fetching package metadata... CondaHTTPError: HTTP 000 CONNECTION FAILED for url &lt;https://conda.anaconda.org/a naconda/win-64/repodata.json&gt; Elapsed: - An HTTP error occurred when trying to retrieve this URL. HTTP errors are often intermittent, and a simple retry will get you on your way. ConnectTimeout(MaxRetryError("HTTPSConnectionPool(host='conda.anaconda.org', por t=443): Max retries exceeded with url: /anaconda/win-64/repodata.json (Caused by ConnectTimeoutError(&lt;urllib3.connection.VerifiedHTTPSConnection object at 0x000 00000054D6128&gt;, 'Connection to conda.anaconda.org timed out. (connect timeout=9. 15)'))",),)</pre><p> 解決的步驟:</p><pre> 1. Update C:\Users\\xxxxxxx\.condarc file with the following: channels: - defaults ssl_verify: false proxy_servers: http: http://sproxy.fg.xxx.com:1000 https: https://sproxy.fg.xxx.com:1000 2. (C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3) C:\Users\xxxxxxx&gt; conda config --set ssl_verify False</pre><p> 附加信息:</p><pre> (C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3) C:\Users\xxxxxxx&gt; conda info Current conda install: platform: win-64 conda version: 4.3.27 conda is private: False conda-env version: 4.3.27 conda-build version: 3.0.22 python version: 3.6.2.final.0 requests version: 2.18.4 config file: C:\Users\xxxxxxx\.condarc netrc file: None offline mode: False user-agent: conda/4.3.27 requests/2.18.4 CPython/3.6.2 Windows/7 W indows/6.1.7601 administrator: False</pre><p> 網上的一些帖子只是重新安裝了Anaconda,除了全新安裝還有其他選擇嗎?</p></div></https:> anaconda 錯誤“url 的 HTTP 000 連接失敗<https: conda.anaconda.org conda-forge linux-64 current_repodata.json> "</https:> 從https://conda.anaconda.org安裝時Conda掛起 如何在Scrapy中一起使用http和https代理? CondaHTTPError:HTTP 000 url 連接失敗<https: conda.anaconda.org plotly win-64 current_repodata.json></https:> Anaconda/conda/python/Windows:如何啟動和激活 conda 環境? 如何在conda的虛擬環境中安裝Anaconda。 如何在沒有 Anaconda 或 Miniconda 安裝程序的情況下安裝 conda?
 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM