Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I cannot use pylint in VSC using pipenv & bash for windows 10

While proceeding Django Project Now, I'm having trouble with linter in VSC, pylint. First I'm using virtual environments with pipenv. and I'm using Visual Studio Code Version 1.19.1 with Windows 10. The trouble that I'm having is even though I installed pylint with pipenv and pip commands, VSC can't recognize it and Installation with Visual Studio Code can't work enter image description hereenter image description here

First I figured out that python path settings pointed global setting, not virtual envs. so I edit settings.json for VSC like following way.

{
    "python.pythonPath": "C:\\Users\\seungjinlee\\AppData\\Local\\lxss\\home\\seungjinlee\\.local\\share\\virtualenvs\\seungjingram-6b3oTnkI\\bin\\python",
}

from enter image description here but It didn't work as well. enter image description here enter image description here

Is it problem with bash for windows? I guess bash shell create virtual enviorments for Ubuntu. but I'm using editor VSC with windows 10 so it can't find pylint for windows,.,.,, plz help me..!

like image 287
Seung Jin Lee Avatar asked Jan 09 '18 04:01

Seung Jin Lee


1 Answers

I had the same problem on Mac OS. I solved it with the next sequence:

$ cd project_directory
$ pipenv install pylint
$ code .

So, the thing is to run VS Code from command line with activated virtual environment. I'm not sure if it helps for Windows, though.

For Windows a workaround may be to specify exact path to pylint in workspace settings:

"python.linting.pylintPath": "C:\\Users\\seungjinlee\\AppData\\Local\\lxss\\home\\seungji‌​nlee\\.local\\share\‌​\virtualenvs\\seungj‌​ingram-6b3oTnkI\\bin‌​\\pylint"
like image 95
German Lashevich Avatar answered Nov 14 '22 22:11

German Lashevich