Quote:
Originally Posted by samooth
is there a page or a post that explains setting up ipython + a compatible equity library under mac os x?
Glad you ask -- I recently looked into it. It turned out to be sort of painful, so I'll document it here in case it helps someone else. I've never really used a Mac much, so no promises that this is the most efficient route.
FWIW, my Mac is running OSX 10.9.3. It came with python installed, and I guess all Macs do? Open a command prompt (i.e a Terminal window) and verify that if you run "python2.7", you get a python prompt.
I ended up not using the Anaconda distribution. Tried it at first, and it was more trouble than it was worth.
So anyway --
1. Install pokereval
- Go here:
http://download.gna.org/pokersource/sources/ and download poker-eval-138.0.tar.gz.
- Open a terminal, find the file you downloaded, unzip it with "tar xzvf poker-eval-138.0.tar.gz" and change into the poker-eval-138.0 directory.
- Run: ./configure
- Run: make
- Run: sudo make install
2. Install pkg-config
- Go here:
http://pkgconfig.freedesktop.org/releases/ and download pkg-config-0.28.tar.gz.
- Find the file you downloaded in the terminal, decompress it with tar zxvf, and change into the directory.
- Run: ./configure --with-internal-glib
- Run: make
- Run: sudo make install
3. Install Homebrew
- Go here:
http://brew.sh/
- Run the command at the bottom of the webpage to install Homebrew
4. Install automake
- Run: brew install automake
5. Install pypoker-eval
- Go here:
http://download.gna.org/pokersource/sources/ and download pypoker-eval-138.0.tar.gz.
- Decompress it with "tar xzvf", change into the new directory.
- Run: export CFLAGS="-I/usr/local/include/poker-eval"
- Edit the files Makefile.am, config/ccpython.m4, and config/python.m4, and search and replace all instances of "2.6" and "2_6" with "2.7" and "2_7", respectively.
- Run: autoreconf (if it complains about missing files, run automake --add-missing and then run autoreconf again)
- Edit config/py-compile and delete line 52. (The line says "exit 1" and is right below something about "Missing argument to --destdir" (destdir, not basedir).)
- Run: ./configure
- Run: make
- Run: sudo make install
- Change directories: cd /usr/local/lib/python2.7/site-packages/ and run: sudo mv *pokereval* /Library/Python/2.7/site-packages/
7. Install pip
- Run: curl -o get-pip.py
https://bootstrap.pypa.io/get-pip.py
- Run: sudo python2.7 get-pip.py
8. Install iPython and friends
- Run: sudo pip install pyzmq
- Run: sudo pip install jinja2
- Run: sudo pip install tornado
- Run: sudo pip install ipython
Verify that you can open an ipython notebook by running "ipython2 notebook", run "import pokereval" with no errors, and follow along with the intro vids!