Solved: Cell Profiler Analyst source install notes and Classifier thumbnail fetching issue

Had been having a rough time installing from source, and then had thumbnail fetching issue that might have been related to sqlite/mysqlclient solved by changing properties file, so I’m taking notes for my own reference for future installs, maybe someone else will benefit. Am new at this, so be warned, may not work for you.

System: Windows 10 64-bit, python 2.7.13

Installing cellprofiler 3.1.8 from source ( f3d7752):
-Did not use the conda installation, which seemed to prefer incorrect wxpython version (could probably be installed after creating environment, didn’t check if this fixed).
-Changed line: “mysqlclient==1.3.13” to “mysqlclient==1.4.1” which seemed to be the preferred version for python 2.7
-Downloaded mysql connector 6.0.2 and installed. Had to copy from Program File to Program Files(x86) to ensure that mysqlclient can find ‘config-win.h’ and ‘mysql.h’. Be sure to select 6.0.2, other versions led to same fatal error C1083 stuff.
-Also installed MySQL-python-1.2.5
-Ran pip install -e ., cellprofiler now runs from cmd

Installing cellprofiler analyst 2.2.1 ( 7e194e7):
-Followed steps on wiki, no issues, did not attempt to make .exe
-Previously, had issues after trying conda installation of cell profiler, or (as expected) after installing CellProfiler 3.1.8 stable build.

I used my cell profiler pipeline, identified primary objects, filtered those objects, then exported to sqlite database. Ran Cellprofiler analyst, images load fine in image gallery, but upon fetching objects in Classifier, got the following error:

INFO:root:Fetched 20 random cells from whole experiment
INFO:root:20 is greater than the number of objects. Fetching 0 objects.

This was fixed by setting check_tables=no in the properties file. Now everything is working and I can classify and Score Image using models other than Fast Gentle Boosting. This is huge, and will save me days of work compared to sticking with the stable build and fast gentle boosting. Thanks again to the Cellprofiler team, and here’s hoping a funded Cellprofiler Analyst is in the future :slight_smile:

pip list
Package Version

backports.functools-lru-cache 1.5
boto3 1.9.89
botocore 1.12.89
CellProfiler 3.1.8
centrosome 1.1.6
certifi 2018.11.29
chardet 3.0.4
cloudpickle 0.7.0
contextlib2 0.5.5
cycler 0.10.0
dask 1.1.1
decorator 4.3.2
deprecation 2.0.6
docutils 0.14
future 0.17.1
futures 3.2.0
h5py 2.9.0
idna 2.8
inflect 2.1.0
javabridge 1.0.18
jmespath 0.9.3
joblib 0.13.1
kiwisolver 1.0.1
mahotas 1.4.5
matplotlib 2.2.3
mysql-connector-python 8.0.15
mysql-python 1.2.5
mysqlclient 1.4.1
networkx 2.2
numpy 1.15.4+mkl
packaging 19.0
pandas 0.24.1
Pillow 5.4.1
pip 19.0.1
prokaryote 2.4.1
protobuf 3.6.1
pyparsing 2.3.1
python-bioformats 1.5.2
python-dateutil 2.8.0
pytz 2018.9
PyWavelets 1.0.1
pyzmq 15.3.0
raven 6.10.0
requests 2.21.0
s3transfer 0.2.0
scikit-image 0.14.2
scikit-learn 0.20.2
scipy 1.2.0
seaborn 0.9.0
setuptools 40.8.0
six 1.12.0
toolz 0.9.0
urllib3 1.24.1
verlib 0.1
wheel 0.32.3

1 Like

Thanks for this very thorough documentation!

This is amazing. Thank you @cmancuso. I have Windows 10 64-bit and I’m using python 2.7.13 too.

Had a nightmare installing from source until I found your post. I just wanted to mention I found I had to use mysql connector 6.1, then choose a custom install and make sure I installed the C headers to the Program Files (x86)/MySQL directory. This is noted in the documentaiton for MySQLdb as the main reason people get the C1083 fatal error and “cannot find mysql.h”.

I also used mysqlclient 1.4.2, the wheel for which I downloaded separately and then pip installed.

1 Like

Extra note - I actually needed MySQL connector version 6.1.11. Had some real issues recently when the source code was updated to deal with wxPython 4, so I’ve reverted back to the last version of v3.1.8 (2eea5ee) which seems to work OK when filtering objects with a classifier (for a single colour channel at least).