Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install qt4 with home-brew

Tags:

homebrew

qt

I'm trying to install LabelImg, but in order to do so I need to install qt4 first because I'm using python 2. All the guides I find tell me to do

brew install qt qt4

But I just get "Error: No formulae found in taps." I also tried

brew install cartr/qt4/qt

But when I went to build LabelImg I get

make: *** [qt4py2] Error 1

I am on the latest version of OSX and I have tried the alternative methods of installing Qt, it seems like it is installed properly, but I can't use it to make anything

like image 559
Andy Avatar asked May 21 '18 04:05

Andy


People also ask

Where does Qt install on Mac?

To configure the Qt library for your machine type, run the ./configure script in the package directory. By default, Qt is configured for installation in the /usr/local/Trolltech/Qt-4.8. 5 directory, but this can be changed by using the -prefix option. Type ./configure -help to get a list of all available options.

Does Qt work on Mac?

By default, Qt will build for the architecture of your development machine - either x86_64 , or arm64 if you are on an Apple Silicon Mac.

How do I open a Qt file on a Mac?

Download the Qt installer from its official download site at https://www.qt.io/download-qt-installer. The site should detect that your computer is running macOS and recommend "Qt Online Installer for macOS". Click the green "Download" button to download the installer to your Downloads folder.


2 Answers

This Homebrew tap allows you to install Qt4 (and various packages that depend on it) on macOS Sierra and newer. You can install it like this:

brew tap cartr/qt4
brew tap-pin cartr/qt4
brew install qt@4

Source

like image 110
itsdarrylnorris Avatar answered Sep 19 '22 10:09

itsdarrylnorris


Try this:

brew install cartr/qt4/pyqt@4

like image 38
Nina Cai Avatar answered Sep 20 '22 10:09

Nina Cai