0
PyLint: Executing command line: /usr/local/bin/pylint --rcfile=/Users/amansehgal/.rcfile --include-ids=y /Users/amansehgal/Documents/cis519/hw3_skeleton/boostedDT.py
PyLint: The stdout of the command line is: 
PyLint: The stderr of the command line is: Traceback (most recent call last):
  File "/usr/local/bin/pylint", line 11, in <module>
    sys.exit(run_pylint())
  File "/Library/Python/2.7/site-packages/pylint/__init__.py", line 12, in run_pylint
    from pylint.lint import Run
  File "/Library/Python/2.7/site-packages/pylint/lint.py", line 34, in <module>
    import astroid
  File "/Library/Python/2.7/site-packages/astroid/__init__.py", line 54, in <module>
    from astroid.nodes import *
  File "/Library/Python/2.7/site-packages/astroid/nodes.py", line 54, in <module>
    from astroid.scoped_nodes import (
  File "/Library/Python/2.7/site-packages/astroid/scoped_nodes.py", line 25, in <module>
    import io
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/io.py", line 51, in <module>
    import _io
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyCodecInfo_GetIncrementalDecoder
  Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so
  Expected in: flat namespace
 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so

PyLint: Executing command line: /usr/local/bin/pylint --rcfile=/Users/amansehgal/.rcfile --include-ids=y /Users/amansehgal/Documents/cis519/hw3_skeleton/boostedDT.py
PyLint: The stdout of the command line is: 
PyLint: The stderr of the command line is: Traceback (most recent call last):
  File "/usr/local/bin/pylint", line 11, in <module>
    sys.exit(run_pylint())
  File "/Library/Python/2.7/site-packages/pylint/__init__.py", line 12, in run_pylint
    from pylint.lint import Run
  File "/Library/Python/2.7/site-packages/pylint/lint.py", line 34, in <module>
    import astroid
  File "/Library/Python/2.7/site-packages/astroid/__init__.py", line 54, in <module>
    from astroid.nodes import *
  File "/Library/Python/2.7/site-packages/astroid/nodes.py", line 54, in <module>
    from astroid.scoped_nodes import (
  File "/Library/Python/2.7/site-packages/astroid/scoped_nodes.py", line 25, in <module>
    import io
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/io.py", line 51, in <module>
    import _io
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyCodecInfo_GetIncrementalDecoder
  Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so
  Expected in: flat namespace
 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so

I get this error when trying to run pyLint in LiClipse and using the option redirect messages to console. I ran the line on a command prompt without any errors. So the issue is with LiClipse no redirecting output properly. Any ideas ?

/usr/local/bin/pylint --rcfile=/Users/amansehgal/.rcfile --include-ids=y /Users/amansehgal/Documents/cis519/hw3_skeleton/boostedDT.py
marc
  • 797
  • 1
  • 9
  • 26

1 Answers1

0

This usually means that the console env is different from the LiClipse env.

To fix it, print the environment variables from inside LiClipse and from the shell.

You can do that by creating a python script such as:

for key, val in sorted(os.environ.items()):
  print('%s:\n    %s' % (key, '\n    '.join(sorted(val.split(os.pathsep)))))

And then comparing the values you have in either case.

The most common issue would be in the PATH, PYTHONPATH, DYLD_LIBRARY_PATH (on mac) or LD_LIBRARY_PATH (on linux) env variables.

You can also try to start LiClipse from the same shell where you started your command so that it inherits the env variables you have from the shell.

Fabio Zadrozny
  • 24,814
  • 4
  • 66
  • 78