如何在mac上使用pip或brew在我的虚拟环境中安装python-qt4

时间:2017-05-31 10:44:54

标签: macos python-2.7 pip homebrew

我想在Mac上的虚拟环境中安装 python-Qt4 库。我正在运行python 2.7。建议使用:

sudo apt-get install python-qt4

对于mac和linux用户,但由于mac没有apt-get命令,这对我来说失败了。所以我尝试使用brew install python-qt4,但收到此错误消息:

Updating Homebrew...
Error: No available formula with the name "python-qt4" 
==> Searching for a previously deleted formula... Error: No previously deleted formula found.
==> Searching for similarly named formulae... Error: No similarly named formulae found.
==> Searching taps... Error: No formulae found in taps

我尝试运行pip install python-qt4,但我也收到此错误消息:

Collecting python-qt4   Could not find a version that satisfies the
requirement python-qt4 (from versions: ) No matching distribution found for python-qt4

我已尝试过How can i install PyQT4 for Python 2.7?

中的所有解决方案

1 个答案:

答案 0 :(得分:0)

使用:

brew install cartr/qt4/pyq