Pylint – How to print Pylint's sys.path?

Question:

I’m attempting to add modules to my Pylint path so they can be imported by using the solution as seen in this question. Unfortunately, the modules I expect should be available for import after using this solution still don’t seem to be there. I want to check if the path’s I’m trying to add to Pylint were actually added or not. Is there a simple way to print out the sys.path of Pylint? Thank you much!

Asked By: golmschenk

||

Answers:

Pylint should use PYTHONPATH in the same way as the Python interpreter. If not, it may be considered as a bug and reported as such.

You may want to try pylint --init-hook 'import sys;print(sys.path)' to run pylint while displaying its Python path at first.

Answered By: sthenault
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.