Thanks so much,
@DStirling
! I am having trouble finding the RunCellPose plugin anywhere on my system so that I can move it to my plugins directory specified in the CP preferences. I sucessefully updated CellProfiler to 4.2.1 and ran pip install cellpose. I am working in Ubuntu 16.04 LTS, and Python 3.8.12. Any help would be much appreciated!!
First off thanks for everything you are doing for the community.
I have downloaded the entire plugins folder from the github link above and set that folders as my plugins directory on CellProfiler.
I can see multiple new plugins have appeared, but alas RunCellPose is not one of them.
Any idea how i can fix this?
I would advise against adding the entire folder as each plugin has different dependencies.
Chances are something went wrong when loading the plugin. If you run from the command line do you see any error messages in the console?
Hi David,
Thanks for getting back to me, you’re right, I can clearly see that the program cant find cellpose.
(base) alexrimmer@Alexs-MacBook-Pro ~ % pythonw -m cellprofiler
11:19:04: Debug: Adding duplicate image handler for 'Windows bitmap file'
11:19:04: Debug: Adding duplicate animation handler for '1' type
11:19:04: Debug: Adding duplicate animation handler for '2' type
MySQL could not be loaded.
Traceback (most recent call last):
File "/Users/alexrimmer/CellProfiler/cellprofiler/modules/exporttodatabase.py", line 154, in <module>
import MySQLdb
File "/Users/alexrimmer/opt/anaconda3/lib/python3.9/site-packages/MySQLdb/__init__.py", line 18, in <module>
from . import _mysql
ImportError: dlopen(/Users/alexrimmer/opt/anaconda3/lib/python3.9/site-packages/MySQLdb/_mysql.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '_mysql_affected_rows'
Could not load runcellpose
Traceback (most recent call last):
File "/Users/alexrimmer/core/cellprofiler_core/utilities/core/modules/__init__.py", line 71, in add_module
m = __import__(mod, globals(), locals(), ["__all__"], 0)
File "/Users/alexrimmer/Desktop/Cellpose/runcellpose.py", line 3, in <module>
from cellpose import models
ModuleNotFoundError: No module named 'cellpose'
could not load these modules: runcellpose
2022-02-10 11:19:05.169 python[13089:364615] nil host used in call to allowsSpecificHTTPSCertificateForHost
2022-02-10 11:19:05.169 python[13089:364615] nil host used in call to allowsAnyHTTPSCertificateForHost:
2022-02-10 11:19:05.169 python[13089:364615] nil host used in call to allowsSpecificHTTPSCertificateForHost
2022-02-10 11:19:05.169 python[13089:364615] nil host used in call to allowsAnyHTTPSCertificateForHost:
2022-02-10 11:19:05.169 python[13089:364615] nil host used in call to allowsSpecificHTTPSCertificateForHost
2022-02-10 11:19:05.169 python[13089:364615] nil host used in call to allowsAnyHTTPSCertificateForHost:
2022-02-10 11:19:05.169 python[13089:364615] nil host used in call to allowsSpecificHTTPSCertificateForHost
2022-02-10 11:19:05.169 python[13089:364615] nil host used in call to allowsAnyHTTPSCertificateForHost:
2022-02-10 11:19:05.169 python[13089:364615] nil host used in call to allowsSpecificHTTPSCertificateForHost
2022-02-10 11:19:05.169 python[13089:364615] nil host used in call to allowsAnyHTTPSCertificateForHost:
2022-02-10 11:19:05.169 python[13089:364615] nil host used in call to allowsSpecificHTTPSCertificateForHost
2022-02-10 11:19:05.169 python[13089:364615] nil host used in call to allowsAnyHTTPSCertificateForHost:
2022-02-10 11:19:05.170 python[13089:364615] nil host used in call to allowsSpecificHTTPSCertificateForHost
2022-02-10 11:19:05.170 python[13089:364615] nil host used in call to allowsAnyHTTPSCertificateForHost:
2022-02-10 11:19:05.170 python[13089:364615] nil host used in call to allowsSpecificHTTPSCertificateForHost
2022-02-10 11:19:05.170 python[13089:364615] nil host used in call to allowsAnyHTTPSCertificateForHost:
If I move runcellpose.py to a new folder and set that to my default plugin folder i get a similar message:
(base) alexrimmer@Alexs-MacBook-Pro ~ % pythonw -m cellprofiler
11:16:43: Debug: Adding duplicate image handler for 'Windows bitmap file'
11:16:43: Debug: Adding duplicate animation handler for '1' type
11:16:43: Debug: Adding duplicate animation handler for '2' type
MySQL could not be loaded.
Traceback (most recent call last):
File "/Users/alexrimmer/CellProfiler/cellprofiler/modules/exporttodatabase.py", line 154, in <module>
import MySQLdb
File "/Users/alexrimmer/opt/anaconda3/lib/python3.9/site-packages/MySQLdb/__init__.py", line 18, in <module>
from . import _mysql
ImportError: dlopen(/Users/alexrimmer/opt/anaconda3/lib/python3.9/site-packages/MySQLdb/_mysql.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '_mysql_affected_rows'
Could not load runcellpose
Traceback (most recent call last):
File "/Users/alexrimmer/core/cellprofiler_core/utilities/core/modules/__init__.py", line 71, in add_module
m = __import__(mod, globals(), locals(), ["__all__"], 0)
File "/Users/alexrimmer/Desktop/Cellpose/runcellpose.py", line 3, in <module>
from cellpose import models
ModuleNotFoundError: No module named 'cellpose'
could not load these modules: runcellpose
2022-02-10 11:16:44.765 python[13059:363252] nil host used in call to allowsSpecificHTTPSCertificateForHost
2022-02-10 11:16:44.765 python[13059:363252] nil host used in call to allowsAnyHTTPSCertificateForHost:
2022-02-10 11:16:44.767 python[13059:363252] nil host used in call to allowsSpecificHTTPSCertificateForHost
2022-02-10 11:16:44.767 python[13059:363252] nil host used in call to allowsAnyHTTPSCertificateForHost:
2022-02-10 11:16:44.767 python[13059:363252] nil host used in call to allowsSpecificHTTPSCertificateForHost
2022-02-10 11:16:44.767 python[13059:363252] nil host used in call to allowsAnyHTTPSCertificateForHost:
2022-02-10 11:16:44.767 python[13059:363252] nil host used in call to allowsSpecificHTTPSCertificateForHost
2022-02-10 11:16:44.767 python[13059:363252] nil host used in call to allowsAnyHTTPSCertificateForHost:
2022-02-10 11:16:44.767 python[13059:363252] nil host used in call to allowsSpecificHTTPSCertificateForHost
2022-02-10 11:16:44.767 python[13059:363252] nil host used in call to allowsAnyHTTPSCertificateForHost:
2022-02-10 11:16:44.768 python[13059:363252] nil host used in call to allowsSpecificHTTPSCertificateForHost
2022-02-10 11:16:44.768 python[13059:363252] nil host used in call to allowsAnyHTTPSCertificateForHost:
2022-02-10 11:16:44.768 python[13059:363252] nil host used in call to allowsSpecificHTTPSCertificateForHost
2022-02-10 11:16:44.768 python[13059:363252] nil host used in call to allowsAnyHTTPSCertificateForHost:
2022-02-10 11:16:44.768 python[13059:363252] nil host used in call to allowsSpecificHTTPSCertificateForHost
2022-02-10 11:16:44.768 python[13059:363252] nil host used in call to allowsAnyHTTPSCertificateForHost:
Exiting the pipeline validation thread
Ok, so still having an issue using runcellpose. It appears that there might be a back compatability issue between CellProfiler 4.2.0 and cellpose. I get “ImportError: Numba needs Numpy 1.21 or less”. image1736×502 109 KB
If I then downgrade to Numpy 1.21, CellProfiler will not open from terminal and I get this error “numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject” image1738×626 135 KB
Thanks for the suggestion, @DStirling! I tried this without success, but I might be missing something. I reinstalled javabridge and then reinstalled cellpose, but I am still having the same problem. Are there any details I can provide that would make the current issues clearer? Thanks for all your help!
Sorry it’s been a while, another command to try:
First ensure you have the final desired version of numpy installed, then run pip install javabridge --no-cache-dir --no-build-isolation
You may need to also do the same with the centrosome package
You probably need to re-install python javabridge - this has worked in the past in our hands (the last two shouldn’t be necessary if you already have cellprofiler and cellpose pip installed)
Thank you @bcimini for the suggestion. Unfortunately, still not working. See the error below.
Traceback (most recent call last):
File “c:\users\esperanza\documents\github\cellprofiler\cellprofiler\gui\app.py”, line 69, in OnInit
from .cpframe import CPFrame
File “c:\users\esperanza\documents\github\cellprofiler\cellprofiler\gui\cpframe.py”, line 25, in
from .workspace_model import Workspace
File “c:\users\esperanza\documents\github\cellprofiler\cellprofiler\gui_workspace_model.py”, line 8, in
import cellprofiler.gui.figure
File "c:\users\esperanza\documents\github\cellprofiler\cellprofiler\gui\figure_init.py", line 1, in
from ._figure import Figure
File “c:\users\esperanza\documents\github\cellprofiler\cellprofiler\gui\figure_figure.py”, line 8, in
import centrosome.cpmorphology
File “C:\Users\Esperanza\My Documents\python venv\cellpose\lib\site-packages\centrosome\cpmorphology.py”, line 12, in
from ._cpmorphology2 import skeletonize_loop, table_lookup_index
File “centrosome_cpmorphology2.pyx”, line 1, in init centrosome._cpmorphology2
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
OnInit returned false, exiting…
Ah, same theory. Just add centrosome onto the list of things you’re force-reinstalling after setting your numpy version!
Traceback (most recent call last):
File "c:\users\radoslawgrochowski\documents\github\cellprofiler\cellprofiler\gui\app.py", line 69, in OnInit
from .cpframe import CPFrame
File "c:\users\radoslawgrochowski\documents\github\cellprofiler\cellprofiler\gui\cpframe.py", line 25, in <module>
from ._workspace_model import Workspace
File "c:\users\radoslawgrochowski\documents\github\cellprofiler\cellprofiler\gui\_workspace_model.py", line 8, in <module>
import cellprofiler.gui.figure
File "c:\users\radoslawgrochowski\documents\github\cellprofiler\cellprofiler\gui\figure\__init__.py", line 1, in <module>
from ._figure import Figure
File "c:\users\radoslawgrochowski\documents\github\cellprofiler\cellprofiler\gui\figure\_figure.py", line 8, in <module>
import centrosome.cpmorphology
File "C:\ProgramData\Anaconda3\envs\cellprofiler_pose\lib\site-packages\centrosome\cpmorphology.py", line 12, in <module>
from ._cpmorphology2 import skeletonize_loop, table_lookup_index
File "centrosome\_cpmorphology2.pyx", line 1, in init centrosome._cpmorphology2
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
OnInit returned false, exiting...
I was stuck at the same point just now.
Had a virtual environment where the runCellpose with cellpose==0.6.5 ran on Cellprofiler 4.2.1
I tried to upgrade the Cellpose version, ran into the issue @radee2k describes.
I might have tried to upgrade the numpy version .