0
0

More than 3 years have passed since last update.

Windowsコマンドプロンプト上でのインストール時のプロキシ突破

Posted at

トラブル内容

Windowsコマンドプロンプト上でライブラリのインストール等で外部サーバからファイルを入手する際、正しいコマンドを入力しても失敗する。
今回の場合はPythonのpipをアップグレードしようとした際に失敗した。

cmd.exe
> pip install --upgrade pip
ERROR: Could not find a version that satisfies the requirement

原因

プロキシ突破ができていなかったため、外部サーバにアクセスできなかった。
今回の場合は、社内→社外におけるプロキシが突破できていなかった。

対策内容

プロキシ突破するために、--proxyを追加する。(プロキシを指定する)
※http://{ユーザ名}:{パスワード}@{ホスト名}:{ポート番号}の部分は、各環境において変更してください。

cmd.exe
> pip install --upgrade pip --proxy http://admin:password@192.168.0.1:8080
Successfully installed pip-21.2.1
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0