Using brew brew install pyqt (会自动安装dependency) 但是,安装完毕后, 运行 $ brew test pyqt 没有问题 实际import PyQt4的时候还是找不到 运行$brew info pyqt 发现: Phonon support is broken. Python modules have been installed and Homebrew's site-packages is not in your Python sys.path, so you will not be able to import the modules this formula installed. If you plan to develop with these modules, please run: mkdir -p /Users/Tiger/Library/Python/2.7/lib/python/site-packages echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/Tiger/Library/Python/2.7/lib/python/site-packages/homebrew.pth 运行了上面2行命令之后, 发现可以在python 2.7中运行了。 但是3.5中依然不行。 因此更改为: echo 'import site; site.addsitedir("/usr/local/lib/python3.5/site-packages")' >> /Users/Tiger/Library/Python/3.5/lib/python/site-packages/homebrew.pth 依然不行。 最后还是下载的源代码自己编译安装的。from riverbank (Qt4)
|
|