擅长:python、mysql、java
<p>这个问题解决了<a href="https://stackoverflow.com/questions/42843316/solved-how-to-include-libgtk2-0-dev-and-pkg-config-in-cmake-when-installing?noredirect=1#comment72858371_42843316">here</a>
Opencv python不是官方的。我试着在运行Ubuntu的macbook上安装它,作为你,我可以导入cv2,但是有些功能不起作用。</p>
<p>从opencv python网站:</p>
<blockquote>
<p>MacOS and Linux wheels have some limitations:</p>
<p>video related functionality is not supported (not compiled with
FFmpeg) for example cv.imshow() will not work (not compiled with GTK+
2.x or Carbon support)</p>
</blockquote>
<p>现在您可能在尝试安装官方opencv时遇到问题。在尝试安装opencv之前,必须完全卸载opencv python。</p>