0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[Python / VSCode] Unable to handle /opt/homebrew/bin/python3.x といったエラーが VSCode ポップアップメッセージに出現するときの対処法

0
Last updated at Posted at 2026-10-09

症状

私の場合、 git branch などのコマンドを実行するたびに Unable to handle /opt/homebrew/bin/python3.12 というエラーメッセージが VSCode の popup 上に表示されていました。

これは、リモートマシンのみで発生しており、ローカルマシン (MacOS) では発生していなかったことと、エラーメッセージに homebrew が含まれていたことから、 Mac 上の設定が何か悪さをしているんだろう、ということがわかりました。

原因

VSCode の設定ファイルである ~/.vscode/settings.json を疑いましたが、違いました。

VSCode の Python (識別子: ms-python.python) が、その拡張を実行するためのインタプリタを自動選択しており、その結果がリモートサーバ上でも生きていて、問題になっていました。

対処法

以下の手順で解消できました!(๑>◡<๑)

  1. リモートサーバ上の VSCode を開いて Cmd + Shift + P キーを押下し、 VSCode のコマンドパレットを開く
  2. コマンドパレット上で Python: Clear Cache and Reload Window を実行
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?