Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pylinter in Sublime text 3.1.1 still doesn't use Python2.7

Here are my pylinter settings:

    {
        // When versbose is 'true', various messages will be written to the console.
        // values: true or false
        "verbose": false,
        // The full path to the Python executable you want to
        // run Pylint with or simply use 'python'.
        "python_bin": "/usr/bin/python2.7",
        // The following paths will be added Pylint's Python path
        "python_path": [],
        // Optionally set the working directory
        "working_dir": null,
        // Full path to the lint.py module in the pylint package
        "pylint_path": null,
        // Optional full path to a Pylint configuration file
        "pylint_rc": null,
        // Set to true to automtically run Pylint on save
        "run_on_save": true,
        // Set to true to use graphical error icons
        "use_icons": false,
        "disable_outline": false,
        // Status messages stay as long as cursor is on an error line
        "message_stay": false,
        // Ignore Pylint error types. Possible values:
        // "R" : Refactor for a "good practice" metric violation
        // "C" : Convention for coding standard violation
        // "W" : Warning for stylistic problems, or minor programming issues
        // "E" : Error for important programming issues (i.e. most probably bug)
        // "F" : Fatal for errors which prevented further processing
        "ignore": [],
        // a list of strings of individual errors to disable, ex: ["C0301"]
        "disable": [],
        "plugins": []
    }

I've clearly put the python2.7 executable in the right place (I think). This is the path given to me by which python2.7. And yet, a statement like print "test" still returns E0001 Missing parentheses in call to print - a classic python3 vs 2 error.

How can I get it to check for python2.7 errors?

like image 700
LittleBobbyTables Avatar asked Nov 21 '18 15:11

LittleBobbyTables


1 Answers

Have you tried to set up "executable" as suggested in documentation? http://www.sublimelinter.com/en/stable/linter_settings.html#executable

The snippet from my configuration (Windows):

"executable": "C:\\Python27\\Scripts\\pylint.exe"
like image 187
gbajson Avatar answered Nov 13 '22 06:11

gbajson