Search code examples
pythonsublimetext3importerrorpylint

ImportError while using Pylinter in Sublime Text


I'm using MacOS. After:

  • Installing pylint using pip install pylint
  • Installing Pylinter in Sublime Text 3 using package control

…it turned out that pylint was not found:

Fatal pylint error:
ImportError: No module named pylint

The solution for that problem was to simply add the path to lint.py into the Preferences file for Pylinter, which I found to be:

/usr/local/lib/python2.7/site-packages/pylint/lint.py

Now, the problem is instead the following:

Fatal pylint error:
ImportError: No module named astroid

This package is already installed. Any ideas what might be missing? Thank you.


Solution

  • I had a lot of trouble with pylinter too. The same error as you had was one among others. I changed the location path like described above, but I got other problems afterwards. For this reason, I decided to switch to SublimeLinter. I have to say, this solution saved me a lot of time and is very satisfying. Furthermore, you have a great documentation and a lot of users, which is also helpful.

    Maybe you could consider switching to SublimeLinter to?

    Sorry for not answering your question directly...