3
0

More than 3 years have passed since last update.

vscodeでpipenv使うと端末が勝手にpipenv環境内に入り込むの対処法

Posted at

概要

vscodeのpython interpreterの設定がpipenv環境である場合に,vscode内の端末を開くと,勝手に source $VENV_LOCATION/bin/activateが実行されて,pipenv環境内に入ってしまう.
それだと,.envで設定したpipenv環境内での環境変数が反映されず困る.

やりたいこと

vscodeのpython interpreter設定でpipenv環境が選択されていたとしても,端末で自動的にpipenv環境がactivateされないようにする.(あとから pipenv run なり pipenv shellを叩きたいのだ)

対処法

vscodeの設定画面を開き,
python.terminal.activateEnvironmentを検索して,enableチェックを外す.
ただこれだけだったが,日本語では僕の検索能力ではヒットしなかったので,一応書いておく.

3
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
3
0