web-dev-qa-db-ja.com

Anacondaを(httpsではなく)HTTPプロキシの背後で動作させる方法は?

職場のプロキシの背後でAnacondaを操作するのに問題があります。

次の環境変数がある場合:

http_proxy: http://domain\username:[email protected]:8080
https_proxy: https://domain\username:[email protected]:8080

あるいは単に

http_proxy: http://server\username:[email protected]:8080

セットアップしてからgitが動作します。しかし、Anacondaは機能しません。私は走ろうとしています

conda update conda

そして私は得る:

Could not connect to https://repo.continuum.io/pkgs....
Could not connect to https://repo.continuum.io/pkgs....

Anacondaはhttpで動作しませんか? HTTPSプロキシが必要ですか?私の会社ではhttpsプロキシサーバーがセットアップされていないのではないかと考えているためです(httpを使用しているだけです)。または時々エラーが発生します:

File "c\Anaconda2\", line 340, in wait
    waiter.acquire()
KeyboardInterrupt
Could not connect to https://repo.continuum.io/pkgs....
Could not connect to https://repo.continuum.io/pkgs....

Windows 7を使用しています。

15
Alo

windowsユーザー領域に。condarcファイルを作成する必要があります。

C:\Users\<username>\

ファイルには以下が含まれている必要があります。

channels:
- defaults

# Show channel URLs when displaying what is going to be downloaded and
# in 'conda list'. The default is False.
show_channel_urls: True
allow_other_channels: True

proxy_servers:
    http: http://proxy.yourorg.org:port
    https: http://proxy.yourorg.org:port


ssl_verify: False
34
toasteez

環境変数にHTTP_proxyとHTTPSプロキシを追加しました。使用された形式は「sername:password @ proxy_name:port」でした。その後、Anaconda Promptを再び開きました。 「set」と入力して、追加された変数がAnaconda環境に存在することを確認します。これで、Anancondaプロンプトで「spyder」と入力できます。この設定はうまくいきました。

当初、プロキシパラメータを使用して ".condarcファイルを設定しようとし、" conda update conda "を試してみました。

3
Abhishek025

以下は、Anacondaのプロキシを永続的に設定するのに役立ちました。

C:/ ProgramData/Anaconda3/etc /に移動します

Condaフォルダーがまだない場合は作成します。

フォルダーがactivate.dおよびdeactive.dになっていない場合は、作成します。

また、両方のフォルダーにenv_vars.batを作成します。最終構造は、次のスナップショットのようになります。

enter image description here

Activate.dのenv_vars.batに、以下を貼り付けます(独自のプロキシに変更します)。

set HTTP_PROXY=http://xx.xx.x.xx:xxxx/
set FTP_PROXY=http://xx.xx.x.xx:xxxx/
set HTTPS_PROXY=https://xx.xx.xxx.xx:xxxx/

Deactivate.dのenv_vars.batに、以下を貼り付けます(変数を空白のままにします)。

set HTTP_PROXY=
set FTP_PROXY=
set HTTPS_PROXY=

Anacondaプロンプトを閉じて再度開き、変更を有効にします。

2
yl_low

.condarcを変更する上記のソリューションは、私にとってはうまくいきません。ただし、システムの詳細設定の環境変数を https:// user:[email protected]:808 の形式で更新することに成功しました。

パスワードに特殊文字が含まれている場合は、Wikipediaの予約文字のパーセントエンコードの説明に従ってエスケープする必要があります。 https://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_reserved_characters

1
Mina HE

上記の解決策がうまくいかなかった場合は、これを試すことができます。

PCの設定に移動してから、プロキシに移動します。プロキシ設定をPCに対してグローバルに指定するだけです。私がそれをしたとき、それは私のために働いた。

enter image description here

1
Sadman Amin

証明書yourcertname.pemで私のために働いた: https://aafaqueabdullah.wordpress.com/2017/04/10/ssl-authentication/

0
itsergiu