pi_over_2

2010-12-29 15:22 UTC

gravatar for pi_over_2

Do you have instructions on how to install the mentalcalculation program on Mac OS X? I tried installing the pyqt packages, but had no luck. I don't think it's a trivial process (my dad has a Mac).

Any suggestions? Thanks!

solsTiCe d'Hiver

2010-12-29 18:01 UTC

gravatar for solsTiCe d'Hiver

I have no experience with any Mac with python/qt/pyqt. but there is clearly a problem.
http://python.org provides a binary package for the macs http://bit.ly/hdVDaW .
nokia provides binary package for Qt http://bit.ly/fFQfZG
but it seems pyqt only offer source package and no binary package ?

so you have to find a binary package of pyqt. or how to do it from source by compiling the source code. may be beyond your expertise. Try to search on pyqt mailing-list http://bit.ly/gvo6IK and eventually ask for a binary package or installer, but don't expect an anwser.

another way is to use fink from http://www.finkproject.org but you will certainly have to install a few package. but that's easier.

Update:
there is also the possibility to use http://www.macports.org May be that's the easiest way ? I don't know

pi_over_2

2011-01-03 22:20 UTC

gravatar for pi_over_2

After about 20 hours of tinkering, i was finally able to run mentalcalculation on Mac OS X 10.5 (Leopard).

This involved downloading and installing XCode 3.1.4 (I had initially downloaded the 3.5 GB XCode 3.5.2, but this works only for Mac OS 10.6), Qt, and MacPorts.

I then adapted the instructions from http://arstechnica.com/open-source/guide.... The commands I ran were:

$ sudo port install python27
$ sudo port install python_select
$ sudo python_select python27
$ sudo port install phonon
$ sudo port install py27-macholib
$ sudo port install py27-sip
$ sudo port install py27-pyqt4
$ sudo port install py27-py2app

I also installed Espeak. I also had to run a few tweaks to get all this working.

So I am able to run the mentalcalculation as:

$ python http://mentalcalculation.py

However, I think it would hard to build a distributable version. The article above says

"The lack of support for plugins in py2app applications is a pretty big problem because it means that a lot of other critical functionality, such as Phonon, isn't going to be accessible."
"PyQt is clearly unsuitable for building distributable Mac applications."

Anyway, I am declaring victory!

solsTiCe d'Hiver

2011-01-23 20:45 UTC

gravatar for solsTiCe d'Hiver

I was able to get a Mac Installation (in virtualbox) to experiment a bit.

In fact compiling pyqt from source is not that hard. It is easier, I think, than using Fink or Mac Ports: because to install pyqt those 2 need to install many dependencies, and compile each of them, whereas if you install pyqt from source yourself, this is the only thing you need to compile.

So I suggest the following procedure:
* There is no need to install python because Mac Os X already comes with an installation of python.
* First install XCode for your Mac. You can find it on the Mac Os Installation DVD. If not, go to Apple web site. You could avoid installing the documentation
* Second, install Qt by going to http://bit.ly/fFQfZG. Choose the appropriate package. We don't need either the documentation and the examples.
* Go to http://www.riverbankcomputing.co.uk and download the SIP and PyQt source code
* Then compile and install SIP:
In a Terminal:
cd sip-4.12
python configure.py
make
make install
* Then compile and install pyqt
cd PyQt-mac-gpl-4.8.2
python configure.py
make
make install

You now have a complete installation of pyqt. That is only if you want to use mentalcalculation from source code.

You could expect to be able to simply install an App bundle for the Mac, as soon as I can make one.

solsTiCe d'Hiver

2021-10-26 15:03 UTC

gravatar for solsTiCe d'Hiver

For the ones stumbling upon this old thread, these are rather old instructions.

Here is how to do it now (now being 2021).

1. You need to install python3, first.
You can either use the official installer at python.org for that. Or you can use 'brew' (from brew.sh) to install it. This is a safe choice if you intend to install more open source software on your mac.
2. then you can install PyQt5 with pip provided by your python installation, run: 'pip3 install PyQt5' in a terminal.

Then you can run 'python3 mentalcalculation.py' from the source code folder.