LoginSignup
0
0

More than 1 year has passed since last update.

Pythonの仮想環境でpip installして「ValueError: check_hostname requires server_hostname」が出たときのプロキシ設定

Last updated at Posted at 2023-02-15

問題

Windows10でPythonを使って仮想環境を構築し、pip install xxx したら以下のエラーが出て悩みました。

ValueError: check_hostname requires server_hostname

解決方法

プロキシを使用しているPCでGit Bashでpip installしていたので、~/.bash_profileファイルに以下を追加したらインストールできました!

.bash_profile
# プロキシ設定
export http_proxy="[プロキシアドレス]:[ポート番号]"
export https_proxy="[プロキシアドレス]:[ポート番号]"

プロキシを使っているPCだと設定がないと、いろんな場面でコマンドエラーが出るので注意が必要ですね。

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