bitcoin python OpenCL mining setup on MacOS

Credits: Thanks to Syke's article on forum.bitcoin.org!!! This is only applicable for Mas OS X Snow Leopard (10.6.x).

0. Download and install bitcoin client for MacOS from bitcoin.org

$ cd "$HOME/Library/Application Support/Bitcoin" ### if not exists, run bitcoin client first
$ touch bitcoin.conf
$ echo "rpcuser=un" > bitcoin.conf
$ echo "rpcpassword=pw" >> bitcoin.conf
$ /Applications/Bitcoin.app/Contents/MacOS/bitcoin -server & ### assuming you installed bitcoin in "/Applications"

1. Install c++ boost libraries with homebrew

$ brew install boost

Refer to https://github.com/mxcl/homebrew/wiki/installation, if you do not have homebrew installed.

2. Retrieve, build and install pyopencl

$ git clone http://git.tiker.net/trees/pyopencl.git
$ cd pyopencl
$ ./configure.py --boost-inc-dir=/usr/local/include \
--boost-lib-dir=/usr/local/lib \
--boost-python-libname=boost_python-mt
$ make
$ sudo make install

Note: You may install git via homebrew or installer from git-osx-installer.googlecode.com.

3. Install python-jsonrpc

$ svn checkout http://svn.json-rpc.org/trunk/python-jsonrpc
$ cd python-jsonrpc/
$ sudo python setup.py install

4. Retrieve and run poclbm mining scripts

$ git clone http://github.com/m0mchil/poclbm
$ cd poclbm
$ python poclbm.py -d 0 --user un --pass pw

P.S., the scripts run well, 58000 khash/s with 4850 on my iMac…

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

To submit your comment, click the image below where it asks you to...
Clickcha - The One-Click Captcha