4

pyqt4 is deprecated, but is still required for some applications, like electrum.

homebrew says that it will not install. this is not possible without rewriting the program.

can anyone advise of a workaround to install pyqt4?

4

Anaconda python (https://www.continuum.io/) provides binaries for a wide variety of packages including pyqt and all required support libraries. Similar to virtualenv, conda allows separate environments to be created with different versions of the packages; in your case, various versions of qt 4 and qt 5.

Download the 20MB bash installer for Python 2.7 http://conda.pydata.org/miniconda.html

install with bash Miniconda2-latest-MacOSX-x86_64.sh

The following packages are required for electrum:

conda create -n electrum python=2.7 pyqt=4.11.4 dnspython ecdsa pbkdf2 protobuf requests six
source activate electrum

Additional dependencies not available in anaconda can be installed via pip:

pip install dnspython jsonrpclib qrcode slowaes

You can then install electrum as usual:

git clone https://github.com/spesmilo/electrum.git
cd electrum
pyrcc4 icons.qrc -o gui/qt/icons_rc.py
python setup.py install

The resulting command will be in the bin directory of the electrum environment. This can be symlinked into ~/bin as follows:

ln -s ~/anaconda/envs/electrum/bin/electrum ~/bin

You can now run electrum from the terminal even when the anaconda environment is not loaded.

electrum
| improve this answer | |
  • Haven't tested this because anaconda is 400MB! – jakethedog Oct 27 '16 at 7:35
  • miniconda (conda.pydata.org/miniconda.html) is a 20 MB download with the same packages available. This is the same size as the pkg file for python 2.7 on python.org. – Neapolitan Oct 27 '16 at 13:42
  • miniconda worked great. i had to do pyrcc4 icons.qrc -o gui/qt/icons_rc.py after compiling to fix an error recording icons. all good now. thank you! – jakethedog Oct 27 '16 at 16:37
  • The pyrcc4 has to have come before the install; I'll update the response. – Neapolitan Oct 27 '16 at 17:50
  • Somehow ~/anaconda/ directory doesn't seem to exist? – Jikku Jose Nov 21 '16 at 14:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .