错误:没有名为“”的模块
我使用 pylint 检查我的 python 代码时遇到了一个小问题。 我在代码中使用 opencv 库,这会导致
E: 85: Module 'cv' has no 'MoveWindow' member
代码中出现错误。 其原因解释如下: http://www.logilab.org/blogentry/78354
所以我按照他们的要求做了,在我的代码中创建了一个 astng_cv.py 文件。 我更新了我的 PYTHONPATH 以便他知道我的文件在哪里。
但是当我尝试 : 时
pylint --load-plugins astng_cv eagle_road.py
,我总是遇到 :
ImportError: No module named astng_cv
错误。
这很烦人,我真的不知道该怎么做才能解决这个问题。
你有什么想法吗?
提前致谢!
I got a small problem using pylint to check my python code.
I use the opencv library in my code, which results in
E: 85: Module 'cv' has no 'MoveWindow' member
errors in my code.
The reason for that is explained here :
http://www.logilab.org/blogentry/78354
So I did just as they asked and created an astng_cv.py file in my code.
I updated my PYTHONPATH so that he knows where my file is.
But when I try :
pylint --load-plugins astng_cv eagle_road.py
I keep having a :
ImportError: No module named astng_cv
error.
This is quite annoying and I don't really know what to do to solve the issue.
Would you have an idea?
Thanks by advance !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将 astng_cv.py 放在 PYTHONPATH 的某个位置
put the astng_cv.py somewhere on your PYTHONPATH
问题似乎在这里解决了一半: http://www.logilab.org/5697
我可以加载我的模块直接设置 PYTHONPATH :
但是每次都必须设置它是很无聊的。
源似乎使用 imp.load_source ,但我无法真正理解以哪种方式 :s 。
然后还在寻找^^。
The issue seems half solved here : http://www.logilab.org/5697
I can load my module in setting the PYTHONPATH directly :
But it is quite boring to have to set it each time.
The source seems to use imp.load_source, but I coulnd't really understand in which way :s .
Still searching then^^.