pylint false positive E0401 import errors in vscode while using venv

前端 未结 4 1192
醉话见心
醉话见心 2021-02-05 06:40

I created a venv using python3.6 on my mac os in this folder /Users/kim/Documents/Apps/PythonApps/python36-miros-a3

I ran a pip install pylint

4条回答
  •  爱一瞬间的悲伤
    2021-02-05 07:25

    Just my $0.02 on how I fixed it in my situation.

    My problem was totally related to having pylint installed globally, and coding in a venv. vscode was trying to use the globally installed pylint which simply was not aware of dependencies I installed in my Python venv. This answer solved my problem. It points here which explained how to configure vscode to run using the venv for my project. Once i did that vscode immediately threw a warning saying I had no linting tool installed and prompted me to install one. Once that was done my linting false-positives went away.

提交回复
热议问题