CellProfiler 3.1.9 wont start Pyinstall error

Hi,
I hope this is the right place for such an issue, i have been trying to find a solution since yesterday without any luck.

I am having issues running Cell profiler 3.1.9 on my system.
Every time I install and run it I get the cmd pop up and show an error message before closing.
Error is:

Traceback (most recent call last):
File “CellProfiler.py”, line 3, in
File “c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py”, line 395, in load_module
File “CellProfiler\cellprofiler_main_.py”, line 13, in
File “c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py”, line 395, in load_module
File “site-packages\bioformats_init_.py”, line 21, in
File “c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py”, line 395, in load_module
File “site-packages\javabridge_init_.py”, line 38, in
File “c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py”, line 395, in load_module
File “site-packages\javabridge\jutil.py”, line 157, in
File “c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py”, line 684, in load_module
ImportError: DLL load failed: %1 ist keine zulõssige Win32-Anwendung.
[13968] Failed to execute script CellProfiler

As far as i have understood the %1 win32 error means there is a bit incompatibility in one of the dlls (32 vs 64bit).
I tired installing Python2.7 as 32bit and 64 bit with no change in this error.
I also reinstalled CellProfiler, no change.

Any help would be appreciated.

Hi @CanBi,

Could I check whether you’re running a packaged version of CellProfiler or building from source?

Thanks

I installed cellprofiler from a package downlaoded from the webpage on Win 10.
I havent tried building from source, is that something you think may solve the issue?

No, I wouldn’t recommend trying to build from source. What’s unusual here is that CellProfiler appears to be trying to run from an installation of Python 2 on your machine, when it’s supposed to be using a python environment which we package within CellProfiler itself. Do you definitely get the same traceback if you don’t have Python 2 installed (C:\python27)?

So i uninstalled the python 2.7 and ran CellProfiler from cmd again. Even though the directory C:\python27 now does not exist I still get the same error.
just with a different code: [9932] Failed to execute script CellProfiler
I have also tried installing Cellprofiler to another disk on the same system, same issue.

Could you post the full error trace?

Hi DStirling,
Sorry i meant to add it last time. here is the traceback, same issue as before. This is with all versions of Python uninstalled from system.

Traceback (most recent call last):
File “CellProfiler.py”, line 3, in
File “c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py”, line 395, in load_module
File “CellProfiler\cellprofiler_main_.py”, line 13, in
File “c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py”, line 395, in load_module
File “site-packages\bioformats_init_.py”, line 21, in
File “c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py”, line 395, in load_module
File “site-packages\javabridge_init_.py”, line 38, in
File “c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py”, line 395, in load_module
File “site-packages\javabridge\jutil.py”, line 157, in
File “c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py”, line 684, in load_module
ImportError: DLL load failed: %1 ist keine zulõssige Win32-Anwendung.
[3016] Failed to execute script CellProfiler

Hi again,

Thanks. That doesn’t seem possible if it’s been properly uninstalled. Could you check that c:\python27 has actually been removed?

There is no such folder in explorer, nor can I find it via cmd on any user account. I deleted it via windows uninstall and checked again to see if any files/folder remained.
I even uninstalled Cellprofiler, then Python2.7 then re installed Cellprofiler, same outcome.
Its a mystery to me why Cellprofiler is calling files which it doesnt need and dont exist.

That’s very unusual. Could you check your system environment variables to see if there’s something pointing to the python27 folder? If it’s been uninstalled there’s no circumstance in which CellProfiler should be attempting to open that folder.

also no luck here. The only non-standard environmental variable is Java JRE CP_Java_Home.
No mention of Python.

Thanks for checking. Could you confirm what CP_JAVA_HOME is set to?

When looking for Python, it may appear in the system section’s ‘Path’ variable, which is a list of different useful directories.

The CP_JAVA_HOME is set to C:\Program Files (x86)\Java\jre1.8.0_201
also in the system settings “path” there is no python entry.
Since CellProfiler 3.1.9 does not need Java installed maybe uninstalling Java would help?

CP 3.1.9 does not need java installed, but it needs CP_JAVA_HOME to be pointed to it’s own Java installation. Did you set that variable yourself? Because it should be pointing to the CellProfiler/java folder rather than a java installation elsewhere on the system. You may also need to remove any JAVA_HOME variable if one exists.

Hi Dstirling,

i solved the issue, it seems that the Java_cp_home was set for an older version of cell profiler and then interfered with the process of starting. I removed the path and reinstalled 3.1.9. It now works without a hitch.
Thanks for all the advice! much appreciated

1 Like