Running PyChess on Mac OS

733 views
Skip to first unread message

Patrick T

unread,
Oct 3, 2014, 12:05:41 PM10/3/14
to pychess...@googlegroups.com
Any suggestions on how I might be able to run PyChess on Mac OS  X 10.9?

I have fink installed, which I understand can be used to install any dependencies PyChess might need.

thanks!

Patrick

unread,
Oct 3, 2014, 2:46:48 PM10/3/14
to pychess...@googlegroups.com
I have Eclipse IDE set up to run with Python 3.4 and Python 2.7, with numpy, scipy and such. Not sure how to go about launching PyChess in this setup, if it is at all possible. Thanks.

Tamás Bajusz

unread,
Oct 3, 2014, 6:18:24 PM10/3/14
to pychess...@googlegroups.com
PyChess dependencies are listed here:
https://code.google.com/p/pychess/source/browse/INSTALL

Unfortunately I have no Mac. Maybe others can help.

Patrick

unread,
Oct 4, 2014, 6:50:50 AM10/4/14
to pychess...@googlegroups.com
PyChess dependencies are listed here:
https://code.google.com/p/pychess/source/browse/INSTALL

Thanks, I hadn't seen that. Well this does not bode well as I'm having all sorts of problems installing most of these...

I've managed to install gnome-icon-theme and cairo but no luck with the rest ... sigh ...

For instance:

$ sudo pip install pygtk
...
Command python setup.py egg_info failed with error code 1 in /private/tmp/pip_build_root/pygtk

This error may be related to the setuptools package being out of date or having problems, based on a quick keyword search, but --successfully-- upgrading to the latest version doesn't seem to help:

$ sudo pip install --upgrade setuptools

In a word, it's a mess and unless I can find a step-by-step guide to getting PyChess work on Mac OS, I guess I'll have to put this venture on hold and go ahead with what I've been putting off for months: yet another clean install of unbuntu on my much-hated lenovo laptop ;-)

Thanks!

Dependencies:
python >= 2.6
pygtk
pygobject
pycairo
gnome-python-desktop
python-rsvg (if it's in a separate package in your distribution)
gnome-icon-theme
gst-python (OPTIONAL for sound)

Magnus Lidman

unread,
Oct 4, 2014, 7:12:35 AM10/4/14
to pychess...@googlegroups.com
Another (quicker) way is to download Virtualbox for Mac OS X and run Ubuntu as a virtual machine....

/Magnus

Sent from a mobile device
--
You received this message because you are subscribed to the Google Groups "PyChess People" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pychess-peopl...@googlegroups.com.
To post to this group, send email to pychess...@googlegroups.com.
Visit this group at http://groups.google.com/group/pychess-people.
For more options, visit https://groups.google.com/d/optout.

Patrick

unread,
Oct 4, 2014, 8:11:36 AM10/4/14
to pychess...@googlegroups.com
Thanks Magnus!

The thing is that I have very little hard drive space left on my MacBook Air, a laptop I use for leisure, hence the plan to have PyChess on it using the already-installed Python programs. I may have been wrong but I assumed that a virtual box would need more hard drive space than I have, so I was trying to take an easy route.

It looks like I've made some progress installing some of the dependencies, by "manually" installing the latest version of the setuptools and some of the other ones. I'll report back if I find some interesting tips for Mac users. But if I can't crack it by the time of the football game, I'll switch to my linux laptop, normally reserved for work, where I don't expect too many problems, and violate yet again my principle of the sacred separation between work and leisure.

Matthew Gatto

unread,
Oct 4, 2014, 9:02:49 AM10/4/14
to pychess...@googlegroups.com
If you're feeling adventurous you could install try using jhbuild to autobuild the whole gnome stack. You'd need +1GB of disk space and you'd need to uninstall Fink according to the below link. You'd also need to make jhbuild build pygtk and run pychess from the jhbuild shell with $PREFIX and $PATH adjusted appropriately. The virtual machine route mentioned by Magnus would be alot easier of course.

https://wiki.gnome.org/Projects/GTK%2B/OSX/Building

Patrick

unread,
Oct 4, 2014, 11:08:48 AM10/4/14
to pychess...@googlegroups.com

If you're feeling adventurous you could install try using jhbuild to autobuild the whole gnome stack. You'd need +1GB of disk space and you'd need to uninstall Fink according to the below link.

Thanks Matthew, this is a very detailed explanation. 1GB of disk is great, my fink/pip/etc experiments have already taken up 5GB! I'll see if what I've got now can be made to work and, if not, as soon as I've got a bit of leisure time on my hands I'll give GTK+ a try!

:-)

Tamás Bajusz

unread,
Oct 4, 2014, 1:29:45 PM10/4/14
to pychess...@googlegroups.com

Patrick

unread,
Oct 6, 2014, 10:54:41 AM10/6/14
to pychess...@googlegroups.com

Thanks Tamás, every little bit helps!

No luck so far with Mac OS so I'll take a break for now on the Mac. I've probably spent too much time on this already, so I'll move to my linux system and stop trying to be fancy with the Mac ;-)

For the record, I copy below some notes I made while going mad.

Run from source
  $ cd $HOME/Python/PyChess
  $ tar -xvf pychess-0.12rc2.tar.gz
  $ cd $HOME/Python/PyChess/pychess-0.12rc2
  $ ./pychess

Install
  $ cd pychess-0.12rc2
  $ sudo python setup.py install

PyChess Dependencies:

python >= 2.6
pygtk
pygobject
pycairo
gnome-python-desktop -> gnome-python2-desktop-py27
python-rsvg -> see gnome-python2-desktop-py27

gnome-icon-theme
gst-python (OPTIONAL for sound)

  $ sudo fink install gnome-icon-theme

  $ sudo fink install cairo

  $ sudo fink install pixman

Trying to install pycairo... following failed:

  $ sudo pip install pycairo
 
  No distributions at all found for pycairo

  for python3:
  $ sudo pip install http://cairographics.org/releases/pycairo-1.10.0.tar.bz2

  for python2:
  $ sudo pip install http://cairographics.org/releases/py2cairo-1.10.0.tar.bz2

results in errors:

Command python setup.py egg_info failed with error code 1 in /private/tmp/pip-npms0cfw-build

If you have installed an incorrect version and want to clean things up:

  $ sudo port uninstall py-cairo python24

"invalid command egg_info" error: try to upgrade setuptools:


  $ sudo pip install --upgrade setuptools

Appears to work. However, my setuptools version is 5 (setuptools-5.1-py2.7.egg-info) rather than the desired 6. See proof below:

  $ cd /sw/lib/python2.7/site-packages && ls

OpenGL
PyOpenGL-3.0.2-py2.7.egg-info
README
_markerlib
backports
backports.ssl_match_hostname-3.4.0.2-py2.7.egg-info
cairo
dateutil
easy_install.py
easy_install.pyc
gtk-2.0
matplotlib
matplotlib-1.3.1-py2.7-nspkg.pth
matplotlib-1.3.1-py2.7.egg-info
mpl_toolkits
nose
nose-1.3.0-py2.7.egg-info
numexpr
numexpr-2.4-py2.7.egg-info
numpy
numpy-1.8.2-py2.7.egg-info
pandas
pandas-0.14.1-py2.7.egg-info
pkg_resources.py
pkg_resources.pyc
pygtk.pth
pygtk.py
pygtk.pyc
pygtk.pyo
pylab.py
pylab.pyc
pyparsing-2.0.1-py2.7.egg-info
pyparsing.py
pyparsing.pyc
python_dateutil-2.2-py2.7.egg-info
pytz
pytz-2014.2-py2.7.egg-info
scipy
scipy-0.14.0-py2.7.egg-info
setuptools
setuptools-5.1-py2.7.egg-info
six-1.7.3-py2.7.egg-info
six.py
six.pyc
tables
tables-3.1.1-py2.7.egg-info
tornado
tornado-3.2.2-py2.7.egg-info
wx-2.8-gtk2-unicode
wx.pth
wxPython_common-2.8.12.1-py2.7.egg-info
wxversion.py
wxversion.pyc

Now install version 6.

First, download manually from: https://pypi.python.org/pypi/setuptools
https://pypi.python.org/packages/source/s/setuptools/setuptools-6.0.2.tar.gz#md5=b79fab610e362fe8e3a9cb92fb9d95ef

Secondly, uninstall setuptools by deleting setuptools* files and directories from your system's site-packages directory.

  $ cd /sw/lib/python2.7/site-packages
  $ sudo rm -rf setuptools*

Then:
  $ cd $HOME/Downloads
  $ tar -xvf setuptools-6.0.2.tar.gz
  $ cd setuptools-6.0.2
  $ sudo python setup.py install

The recommended way to bootstrap setuptools on any system is to download ez_setup.py and run it using the target Python environment.

  $ sudo python ez_setup.py


  $ sudo fink install gnome-python2-desktop-py27

  $ sudo fink install gettext-tools

  $ sudo fink install pygtksourceview2-py27

Now install pygtk

First, download manually from:
http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.24/pygtk-2.24.0.tar.gz

Then:
  $ cd $HOME/Downloads
  $ tar -xvf pygtk-2.24.0.tar.gz
  $ cd pygtk-2.24.0
  $ ./configure
  $ make
  $ make install

Missing packages:
'glib-2.0'
'pygobject-2.0 >= 2.21.3'

  $ sudo fink install glib2-dev

But glib2-dev appears to be insufficient.

First, download manually from:
ftp://ftp.gnome.org/pub/gnome/sources/glib/2.42/glib-2.42.0.tar.xz

Then:
  $ cd $HOME/Downloads
  $ unxz < glib-2.42.0.tar.xz > glib-2.42.0.tar
  $ cd glib-2.42.0
  $ ./configure --prefix=/usr --with-pcre=system && make
  $ make install

First, download manually from:
https://pypi.python.org/packages/source/P/PyGObject/pygobject-2.28.3.tar.bz2#md5=aa64900b274c4661a5c32e52922977f9

Then:
  $ cd $HOME/Downloads
  $ tar -xvf pygobject-2.28.3.tar.bz2
  $ cd pygobject-2.28.3
  $ ./configure
  $ make
  $ make install

I gave up here. The below failed miserably on several levels. To be continued? maybe ...

Try to run PyChess:

Go to /sw/bin/ and execute pychess


Reply all
Reply to author
Forward
0 new messages