Classifier 2.0 Beta for MacOS


I have installed the Classifier 2.0 Beta and downloaded the example database. I do not seem to be able to find any rules. The first change I had to make to the properties files (see attachment) is the “image_url_prepend =”. If I leave it blank I will get an error (see Console log 1). With this properties file I am able to see nuclei in the Classifier 2.0 Beta interface. When I visually separate the images into positives and negatives and try to find rules it returns nothing. Please see the Console log 2 for the error. Is there something wrong with my settings or is this a bug in the program.

Thanks in advance Coen (7.37 KB)

Hi Coen,

Thanks for your thorough report on the hiccups you ran into. Taking it one thing at a time, I see where the bug is with the image_url_prepend. This has already been fixed in the update I’ve been working on, but you’ll be able to get around it as long as you put SOMETHING there that doesnt start with ‘http’ or ‘smb’.

I’m looking into the other issue(s) you mentioned now.

Okay, for the numpy-related error you’re getting, I have a couple questions just to make sure I’m not misunderstanding anything:

  1. Are you getting this error after you’ve sorted your images into the bins when you click “Find Rules” ?
  2. Are you using the downloaded from the website?

Okay, I see now that the answer to those questions is yes. I think we’ve found the bug. I’ll do my best to get a patch out today or tomorrow.

Thanks for looking into the problem. I will try the patch as soon as you have released it.


Hi Coen,

I just wanted to let you know I haven’t forgotten you. We’ve decided to release the newest set of features, and since the release process for Classifier has yet to be streamlined things are taking longer than expected.

Hi Adam,

Do you have any idea when the next version of CPanalyst will be released?



Sorry Coen, I’ve been avoiding answering this question because packaging the “latest and greatest” up for release is something I’ve been trying to get to for months now, and yet enough feature requests and bugs keep popping up to set it further and further back. However, I just responded to another similar question with “HOPEFULLY within 2 weeks.” There are huge improvements across the board in terms of functionality and speed. There’s even a platemap browser that lets you browse your biological data from a high level. Still, we’ve got some big challenges in translating all the new code into something that’s not painful to install.

On the other hand, if you’ve got decent computer skills, you could try and check out our code from svn and do the legwork to install python and the MANY packages that we use (wx, numpy, scipy, MySQLdb, pysqlite, PIL, and maybe others). If this is an option for you, I’d be glad to help!

Hi Adam,

I would like to give it a try and install it myself. If you could send me the the link where I can download the sub version, it would be great. If Icannot get it to work I will not bother you with this, but wait till the release.



I’m sorry to say that it’s no small amount of work to get the development version up and running from scratch, but here’s what you’ll need:


our repository: … CPAnalyst/

You also need the following:
Python 2.5:
numpy: … _id=175103

if you get that far, Classifier is run by:
cd src

Hi Adam,

I have tried to install and compile everything under OS X 10.5.5. “mysql-python” gave me a lot of trouble, I cannot get it to compile even with all the suggestions available on the web (I am no expert though). I switched to windows XP (32 bit) and gave it a try. I changed some code in the “” (line 157 and 379, replaced ‘/’ with ‘\’) to handle windows file names. The Classifier windows shows, but when I try to fetch cells it gives the following error:

Opening image: D:\IBIDI\IBIDI screen\Round 1\IBS202A01_Series002_z000_ch01.tif
Opening image: D:\IBIDI\IBIDI screen\Round 1\IBS202A01_Series002_z000_ch02.tif
Opening image: D:\IBIDI\IBIDI screen\Round 1\IBS202A01_Series002_z000_ch03.tif
cannot identify image file

I guess I have to stick to OS X…

Could you tell me which version of MySQL you are running? Maybe “mysql-python” will compile if I use the same version as you are using


I’m using MySQLdb 1.2.2, I had a bit of trouble installing it as well, but unfortunately, I can’t remember how I got around it. HOWEVER, I did manage to build the app recently, so let me send you that via email, and we’ll see how that goes.

Hi Adam

Please send the file to my gmail account (c.kuijlATgmailDOTcom). My work address probbably does not accept large files


Hi Coen,

Turns out this file is too big for me to attach, so I’ve uploaded it to my account here:

Hopefully this works for you. Take a moment to skim the readme files, especially the properties readme. Most of the problems people have with the software involve errors on their properties files.

Let me know how it goes!

Hi Adam

I decided to get CPanalyst up and running. I have compiled the new version from the svn. Made a new properties file from scratch and retried. When loading the properties file everything goes well till the message: ‘DEBUG:root:Could not import cpfigure, will not display Margin vs. Iteration plot.’ When I continue to drag cells in the correct bin and try to find rules, It works. When I however want to fetch more positives or negatives or score the dataset according to the rules, I get the following error:

DEBUG:DBConnect:[MainThread] SELECT * from mysql.func where name='classifier’
Traceback (most recent call last):
File “”, line 5, in
import cellprofiler.gui.cpfigure as cpfig
ImportError: No module named cellprofiler.gui.cpfigure

Do I need to install CellProfiler Python as well??

Thanks in advance


The margin vs. iteration plot isn’t critical, so you don’t need pyCellProfiler. You will need to install the classifier function in MySQL however. I don’t know how to do this off the top of my head but here’s a link that might get you started ( It’s a holiday today so I’ll have to get back to you on Monday. The MySQL function to be installed is in a file in src/ called _classifier.c

CPA is also now bundled for distribution in Mac and Windows, it’s just a matter of us posting it on the website.

Hi Adam,

Thanks for your reply. I have compiled the and copied it into the plugin folder of mysql installation. Next I tried to create the classifier function with : ‘mysql>> CREATE FUNCTION classifier RETURNS INTEGER SONAME ‘’;’. This resulted in the following error:

ERROR 1126 (HY000): Can’t open shared library ‘’ (errno: 0 dlopen(/usr/local/mysql-5.1.35-osx10.5-x86/lib/plugin/, 2): Symbol not found: __Py_NoneStruct
Referenced from: /)

Any suggestions?

Thanks in advance,


There’s another classify.c, in src/mysql_plugins. That’s the one you want to build and install.

Hi Adam

Success at last. I have compiled the classify.c with the following command:
gcc -fPIC -Wall -I /usr/local/mysql-5.1.35-osx10.5-x86/include -dynamiclib -lstdc++ -o classify.c

copied the to:

started the mySQL server:
/usr/local/mysql/bin/mysql -u root -p

and installed it with:

Thanks again for your help.


Great! Thanks for posting your steps. :mrgreen: