LoginSignup
14
9

More than 5 years have passed since last update.

pyenv 環境下で Visual Studio Code に Python プラグインを入れるとエラーが出る

Posted at

事象

mac で pyenv 環境下で Visual Studio Code に Python プラグインを入れると

Error Linter pylint is not installed

と表示され、Lintingがうまく働かない。また補完候補も表示が期待と異なる。

setting.jsonを見る感じ、VSCodeが読みに行くPythonのPathはpythonコマンドで呼ばれる場所に設定されているはずなのですが、これがなぜか/usr/bin/pythonを読みに行ってしまうからのようです。

解決法

Preferences > Setting を開き、USER SETTING タブのJSONに

    "python.pythonPath": "pyenvで設定したPath(e.g. /User/user/.pyenv/shims/python)"

を追記

差し当たっての解決法ですが、動くようになりました。
(原因ですが未特定、bash_profileにpyenv設定を書いているのが原因?かもです)

環境

  • mac OS Sierra
  • VSCode Version 1.14.2
  • Python プラグイン 0.7.0
14
9
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
14
9