1

I have installed pylint with: pip install pylint and it is in the following path: $HOME/miniconda2/bin and I have add the following to my .bash_profile: export PATH="$HOME/miniconda2/bin:$PATH"

But when selection syntax checker for flycheck I get:

Syntax checker in buffer share_queries.py in python-mode:

  python-pylint (disabled)
    - major mode:         `python-mode' supported
    - may enable:         Automatically disabled!
    - executable:         Not found
    - configuration file: Found at "/Users/larsnielsen/.pylintrc"

Flycheck cannot use this syntax checker for this buffer.

Flycheck Mode is enabled.  Use C-u C-c ! x to enable disabled
checkers.

--------------------

Flycheck version: 31snapshot (package: 20161117.144)
Emacs version:    25.1.1
System:           x86_64-apple-darwin16.1.0
Window system:    ns

I am not sure why. Can someone help ?

  • 1
    This library is used by lots of people to set the $PATH on Emacs for OSX: github.com/purcell/exec-path-from-shell . Perhaps that will help you ... I personally set the $PATH on either a buffer-local basis, or when firing up a particular process, which requires some advanced tinkering .... And, there are many instances where I use the absolute path to a particular program by setting the appropriate variable(s) in Emacs; e.g., (setq whatever-program-name-variable "/absolute/path/to/executable"), etc. – lawlist Apr 9 '18 at 17:41
1

You need to tell python-pylint exactly where to look.

Please add this to your .emacs:

(add-hook 'python-mode-hook (lambda () (setq flycheck-python-pylint-executable "/work/ve/bin/pylint") (setq flycheck-pylintrc "/work/pylintrc")

Changing paths accordingly

If you dont have rc file, you can generate it with

pylint --generate-rcfile > /work/pylintrc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.