'pylint' is not recognized as an internal or external command, operable program or batch file
Asked Answered
A

3

6

I am on Windows 10.

I installed the "pylint" package with the command pip install pylint --user and it successfully got installed.

But when I try to run the command in command prompt,I am getting the 'pylint' is not recognized as an internal or external command, operable program or batch file. I checked the path and it is installed with all the other python packages.How do I solve this?

Azurite answered 14/8, 2020 at 17:24 Comment(6)
What operating system are you on? Make sure site.USER_BASE as mentioned in the docs is in your PATH: docs.python.org/3/install/…Nigel
I'm using windows 10Azurite
can you install the package for all users?Amphictyony
Which command did you execute?Peppers
I tried to run "pylint filename.py". and Pylint is intalled for all usersAzurite
You should read the notice in pylint documentation about usage on windows platform: docs.pylint.org/en/1.6.0/…Refrigerator
A
0

Found a way to make it work

  1. search for "edit the system environment variables" in search.
  2. click environment variables.
  3. under "system variables" click "path" and click edit.
  4. click "new".
  5. go back and copy the path where python package(pylint) is installed and paste it there.
  6. click ok everything.
  7. check now it works...
Azurite answered 22/10, 2020 at 13:50 Comment(1)
This worked(windows). In step 5, I added python's scripts folder in my env variables system's path. for me the scripts folder was located at C:\Users\user1\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts reference here.Meaning
S
14

The following command worked for me:

py -m pylint file.py
Seismoscope answered 24/8, 2020 at 17:10 Comment(1)
I had the same problem, I'm in windows10Seismoscope
A
0

Found a way to make it work

  1. search for "edit the system environment variables" in search.
  2. click environment variables.
  3. under "system variables" click "path" and click edit.
  4. click "new".
  5. go back and copy the path where python package(pylint) is installed and paste it there.
  6. click ok everything.
  7. check now it works...
Azurite answered 22/10, 2020 at 13:50 Comment(1)
This worked(windows). In step 5, I added python's scripts folder in my env variables system's path. for me the scripts folder was located at C:\Users\user1\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts reference here.Meaning
S
0

The below command has taken from the first answer but works fine for the new python version

python3 -m pylint <File_Name>
Sergius answered 10/3, 2023 at 19:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.