LoginSignup
10
11

More than 5 years have passed since last update.

vscodeのterminalで.bash_profileが読み込まれない

Posted at

発生した問題

  • pyenvの設定が.bash_profileに書かれている。
  • vscode上のターミナルを起動したけどpyenvが正しく動かない(認識されずシステムのPythonを見に行ってしまう)

対応策

基本設定 => 設定 => ユーザー設定 を開いて以下を追加すればOK

{
  "terminal.integrated.shellArgs.osx": [
      "-l"
  ]
}

参照元情報

#7672 .bash_profile not sourced in integrated terminal on macのissueが上がってた。
システム設定で-lでログインシェルを有効にしろよとのこと。

補足

terminal.integrated.shellArgs.osxをワークスペース設定に追加すると警告出て怒られます。

10
11
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
10
11