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当尝试在LiClipse中运行pyLint并使用选项将消息重定向到控制台时,我收到此错误。我在命令提示符下运行了这行代码,没有任何错误。所以问题出在LiClipse没有正确重定向输出。有什么想法吗?
/usr/local/bin/pylint --rcfile=/Users/amansehgal/.rcfile --include-ids=y /Users/amansehgal/Documents/cis519/hw3_skeleton/boostedDT.py发布于 2017-04-12 03:05:19
这通常意味着控制台环境与LiClipse环境不同。
要解决这个问题,可以从LiClipse内部和shell打印环境变量。
您可以通过创建python脚本来完成此操作,如下所示:
for key, val in sorted(os.environ.items()):
print('%s:\n %s' % (key, '\n '.join(sorted(val.split(os.pathsep)))))然后比较两种情况下的值。
最常见的问题存在于PATH、PYTHONPATH、DYLD_LIBRARY_PATH (在mac上)或LD_LIBRARY_PATH (在linux上)环境变量中。
https://stackoverflow.com/questions/40186934
复制相似问题