Fra*_*Fra 3 python macos qt nib anaconda
我正在尝试在Mac OS上使用带有anaconda python 的pyqtgraph
Python 2.7.5 |Anaconda 1.6.1 (x86_64)| (default, Jun 28 2013, 22:20:13)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Run Code Online (Sandbox Code Playgroud)
我安装了pyqtgraph pip install pyqtgraph,看起来工作正常.但是,如果我从库中运行任何命令,我会收到此错误:
Qt internal error: qt_menu.nib could not be loaded. The .nib file should be
placed in QtGui.framework/Versions/Current/Resources/ or in the resources
directory of your application bundle.
Run Code Online (Sandbox Code Playgroud)
我发现这个SO线程,似乎与C++应用程序有关.在我的情况下,我没有application.app文件夹,所以我有点迷路.
解决方案是使用python.app(或等效的pythonw)来运行程序,而不仅仅是python.如果pyqtgraph安装了任何命令,您需要编辑它们以便它们的shebang线路调用#!/path/to/anaconda/bin/python.app/Contents/MacOS/python.