Can someone verify versions of python to use cellprofiler conda packages?

Hi,

I am trying to write a code in python using CellProfiler Conda packages, but I haven’t had any success yet.
I am following this:

I have installed CellProfiler 3.1.9 with python 2, but I had to switch back to python3 to pip install Conda packages, I think. There have been many configuration switches that I lost track of.

I am getting errors when importing cellprofiler.
“No module named cellprofiler.image”

Can anyone help?
Is the CellProfiler python packages something that I can use to code?

Any advice would be greatly appreciated!
Thank you.

CellProfiler3.1.9 is indeed Python2, and will need Python2 packages- this is the pip freeze of one of our last 3.1.9 builds.

appdirs==1.4.3
 
atomicwrites==1.3.0
 
attrs==19.3.0
 
backports.functools-lru-cache==1.6.1
 
boto3==1.12.26
 
botocore==1.15.26
 
CacheControl==0.12.6
 
cachy==0.3.0
 
CellProfiler==3.1.9
 
centrosome==1.1.6
 
certifi==2019.11.28
 
cffi==1.14.0
 
chardet==3.0.4
 
cleo==0.7.6
 
clikit==0.4.2
 
cloudpickle==1.3.0
 
configparser==4.0.2
 
contextlib2==0.6.0.post1
 
cryptography==2.8
 
cycler==0.10.0
 
Cython==0.29.15
 
dask==1.2.2
 
decorator==4.4.2
 
deprecation==2.0.7
 
distlib==0.3.0
 
docutils==0.16
 
entrypoints==0.3
 
enum34==1.1.10
 
filelock==3.0.12
 
funcsigs==1.0.2
 
functools32==3.2.3.post2
 
future==0.18.2
 
futures==3.3.0
 
glob2==0.6
 
h5py==2.10.0
 
html5lib==1.0.1
 
idna==2.9
 
importlib-metadata==1.1.3
 
importlib-resources==1.0.2
 
inflect==3.0.2
 
ipaddress==1.0.23
 
-e git+https://github.com/LeeKamentsky/python-javabridge.git@9075654cfa2b465ba63b4fc926f9b11cd51a4a13#egg=javabridge
 
jmespath==0.9.5
 
joblib==0.14.1
 
jsonschema==3.2.0
 
keyring==18.0.1
 
kiwisolver==1.1.0
 
lockfile==0.12.2
 
mahotas==1.4.9
 
matplotlib==2.2.5
 
more-itertools==5.0.0
 
msgpack==1.0.0
 
mysqlclient==1.4.6
 
networkx==2.2
 
numpy==1.15.4
 
packaging==20.3
 
pastel==0.2.0
 
pathlib2==2.3.5
 
pexpect==4.8.0
 
Pillow==6.2.2
 
pipenv==2018.11.26
 
pkginfo==1.5.0.1
 
pluggy==0.13.1
 
poetry==1.0.5
 
prokaryote==2.4.1
 
ptyprocess==0.6.0
 
py==1.8.1
 
pycparser==2.20
 
pylev==1.3.0
 
pyparsing==2.4.6
 
pyrsistent==0.14.11
 
pytest==3.10.1
 
python-bioformats==1.5.2
 
python-dateutil==2.8.1
 
pytz==2019.3
 
PyWavelets==1.0.3
 
pyzmq==15.3.0
 
raven==6.10.0
 
requests==2.23.0
 
requests-toolbelt==0.8.0
 
s3transfer==0.3.3
 
scandir==1.10.0
 
scikit-image==0.14.0
 
scikit-learn==0.20.4
 
scipy==1.1.0
 
SecretStorage==2.3.1
 
shellingham==1.3.2
 
six==1.14.0
 
subprocess32==3.5.4
 
tomlkit==0.5.11
 
toolz==0.10.0
 
typing==3.7.4.1
 
urllib3==1.25.8
 
virtualenv==20.0.7
 
virtualenv-clone==0.5.3
 
webencodings==0.5.1
 
zipp==1.2.0
 

CellProfiler 4.0.0, which is on release candidate 4.0.0rc2, SHOULD be stable enough by now to try and have work pretty well, if you want to bypass that and just use our master branch in Python3.8, though we of course can’t guarantee full stability until we do the release.

Thank you so much for the clarification!

Hi, would you mind if I asked you a few more questions?
I still have some issues with the versions.
Here is what I face:

  1. With Python2 virtual environment and CP 3.1.9, I have an error “ValueError: numpy.ufunc size changed, may indicate binary incompatibility” while importing cellprofiler.pipeline
    Here is my pip freeze.
    pipfreeze_py27.txt (2.7 KB)

  2. With Python3 conda environment and CP 3.1.9, I don’t have the numpy error. However, the issue with this setting is when I load the pipeline. In /pipeline.py loadtxt(), it throws error exception “Failed to load pipeline” when the line in cppipe goes to “select the input image” in CorrectIlluminationCalculate.
    I wonder if this error is about my cppipe file.
    test.cppipe (2.4 KB)
    Here is my pip freeze for this setting.
    pipfreez.txt (2.7 KB)

Any advice would be greatly appreciated.
Happy Fourth!

For CP3.1.9, you can try installing javabridge from source, as you can see from my pip freeze I have done.

In your Python3 environment, you shouldn’t be using 3.1.9 though, you should be using master