CellProfiler / CellProfiler-plugins

Community-contributed and experimental CellProfiler modules.
http://plugins.cellprofiler.org/
56 stars 67 forks source link

Error when installing CellProfiler and its plugins from source on Apple M1 chip #176

Open ML33M opened 1 year ago

ML33M commented 1 year ago

Hi, I have tried to install plugins following the Beginner-level instructions and it did not work. Then i tried to installing CellProfiler and its plugins from source following the https://github.com/CellProfiler/CellProfiler-plugins/blob/master/Instructions/Install_environment_instructions_mac.md

When I run the conda create env:

conda env create -f CellProfiler_plugins_mac.yml

I get

ResolvePackageNotFound: 
   - python-javabridge
   - mysqlclient=1.4.6

I tried to ask

pip install python-javabridge  

but I get a very long error message sectioned below:

  Building wheel for python-javabridge (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [50 lines of output]
      running bdist_wheel
  .....

I read a section says

"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
      #warning "Using deprecated NumPy API, disable it with " \
       ^
       _javabridge.c:612:10: fatal error: 'jni.h' file not found
      #include "jni.h"
                ^~~~~~~
      1 warning and 1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for python-javabridge

I did install mysqlclient alright

pip install mysqlclient===1.4.6 
ML33M commented 1 year ago

I checked I have installed numpy and the jni.h file is in my java "include" folder.

callum-jpg commented 1 year ago

Since this is related to installing CellProfiler specifically, would it be possible for you to try the CellProfiler installation instructions that are on the main cellprofiler repo? The instructions can be found here: https://github.com/CellProfiler/CellProfiler/wiki/Installation-of-CellProfiler-4-from-source-on-MacOS-M1