I have been trying to make flycheck use python 3 syntax similar to this question and ended up having more fundamental questions.

I open a python file and flycheck correctly works, using the python 2 syntax.

I call flycheck-verify-setup to get (among other things)

  - may enable:         yes                                                             
  - executable:         Found at /usr/bin/python                                        
  - configuration file: Not found                                                       
  - `pylint' module:    Found at "/usr/lib/python2.7/dist-packages/pylint/__init__.py"  


M-x eval-expression RET flycheck-python-pylint-executable RET

returns nil, which I don't know how to interpret. Taking a suggestion from this answer I have edited my init.el file with

 (add-hook 'python-mode-hook
        (lambda ()
          (setq flycheck-python-pylint-executable "/various/attempts")

where for /various/attemps I have tried:
- /usr/lib/python3/dist-packages/pylint/__init__.py
- /usr/lib/python3/dist-packages/pylint - /usr/bin/pytlin3 - pylint3

but I don't see any effect on flycheck-verify-setup or by looking again at flycheck-python-pylint-executable.

I didn't make these up, all of these exist. Also, I did not include the line with (setq flycheck-pylintrc "/path/to/.pylintrc") as in the answer. I cannot find this configuration file on my system, and I am not sure where to place it if i create it (/usr/bin?).

I am using Emacs 26.1 on Ubuntu 18.04.1.

Probably irrelevant for flycheck: At some point I had also changed my python-shell-interpreter variable to python3 and saw now change in the output of flycheck-verify-setup.

Your Answer

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

Browse other questions tagged or ask your own question.