importError: No module named ×××
caused by path problems,
点击打开链接1 stack overflow(this worked)
点击打开链接2 csdn
here are my solution,
add a line in the ipdl.py
sys.path.append(os.path.join(os.path.dirname(__file__), '../../python/mozbuild/'))
and another line in the parser.py
sys.path.append(os.path.join(os.path.dirname(__file__), '../../../other-licenses/ply'))
and the importError fixed.
the method of add a sys.path in terminal :
http://www.cnblogs.com/cj2014/p/3867894.html(
python和linux的环境设置/PATH
)
本文介绍了如何解决Python中出现的ImportError问题,通常这类问题是由于系统路径设置不正确导致的。通过向Python的sys.path中添加正确的路径可以解决此问题。文章提供了具体的代码示例,包括如何在不同文件中修改路径。

被折叠的 条评论
为什么被折叠?



