-1

So I just started with Python in VS Code. I have installed Python 3.6.5, and the extension for Python on VS Code. But when I try to save my files, this appears enter image description here

So I do the pip install pylint command, but it does this: enter image description here

Basically, what this means is that it does not recognise "pip", how do I fix this? I've been searching for answer but I could not understand anything.

kath
  • 7,624
  • 17
  • 32
Plazmican
  • 59
  • 1
  • 2
  • 3
  • 1
    Please paste error text as text, instead of posting a blurry screenshot as an off-site picture. – abarnert May 11 '18 at 21:59
  • 1
    But anyway, going by what's in your question: if you don't have `pip` on your PATH, but do have `python` (or `Python.exe`, or whatever), that's exactly why [the docs](https://docs.python.org/3/installing/#basic-usage) recommend `python -m pip install` in place of just `pip install`. – abarnert May 11 '18 at 22:00
  • I tried doing it, but it does the same error with m+ pip install. It said that -m was not recognised. – Plazmican May 12 '18 at 09:31
  • PS C:\Users\Admin\Desktop\Coding> -m pip install -m : Имя "-m" не распознано как имя командлета, функции, файла сценария или выполняемой программы. Проверьте правильность написания имени, а также наличие и правильность п ути, после чего повторите попытку. строка:1 знак:1 + -m pip install + ~~ + CategoryInfo : ObjectNotFound: (-m:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException – Plazmican May 12 '18 at 09:33
  • 1
    You need to include the `python`. And the `pylint`. It's `python -m pip install pylint`, not `-m pip install -m` or `m+ pip install` or any other such thing. – abarnert May 12 '18 at 09:39
  • 1
    It doesn't recognise "python". – Plazmican May 12 '18 at 09:42
  • 1
    Then you have a much bigger problem, and you need to solve that first. How did you install Python? If you used the installer from Python.org, when it gave you an option to add to your PATH, did you disable that? – abarnert May 12 '18 at 09:45
  • 1
    I'll try downloading it again, I think I may have not seen the PATH options – Plazmican May 12 '18 at 09:53

1 Answers1

0

I would try this. Under the View menu select Command Palette. This opens up a window to enter VScode commands. In the command palette look for the command 'Python: Enable Linting'. This allows you to toggle between on or off for linting. Next look for 'Python: Select Linter' lets you chose pylint or another module for linting.

After setting these you should be good to go... And you should have the Python extension installed. The name is the one word: Python. pylint is installed with this extension. Your pip problem may be unrelated.

Natsfan
  • 4,093
  • 3
  • 22
  • 29
  • If I try to select a linter, it makes the "Linter pylint is not installed" error. – Plazmican May 12 '18 at 09:35
  • The extension doesn't come with `pylint`. It _does_ offer to install it if you don't have it—but the OP clicked that button, and it produced the error in his question. And the error is because of his `pip` problem, as you can see from the output. – abarnert May 12 '18 at 09:41