Source installation macOS 10.12.6 issue

java
macos
source
installation

#1

I’m following the instructions from here: https://github.com/CellProfiler/CellProfiler/wiki/Source-installation-%28OS-X-and-macOS%29
Everything works until I run

$ pip install --editable $HOME/CellProfiler

which gives me this error:

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/mk/wsmrq6g95ls8nyt3fznzjzl00000gn/T/pip-build-8StIdW/javabridge/

Is there anything I might’ve done wrong?

EDIT: I have java 9 installed; does cell profiler need java 8 to run?


#2

I believe it does need Java 8; can you try installing that and seeing if it fixes the issue?


#3

I’ve tried installing java 8 (from the oracle site), but the installer won’t run because java 9 is installed. Is there a way for me to have both installed at once?


#4

Not a Mac expert so take my advice for what it’s worth, but google says yes


#5

Hi there,

Can you type in the terminal:

  • java -version

Check what specific version of Java you have?

Then another test is to go python (by typing “python”)

And within python, try

  • import javabridge

I guess it gives an error?

If so, exit python (by “exit()” ), and then do:

  • pip install javabridge
  • pip install python-bioformats
    If it goes well, try again installing CellProfiler, see if that works?

I suspect you couldn’t install javabridge for some reason. Most often it cries for missing JDK or JRE.
Good luck.


Can't launch CP-3.0.0 on iMAC (10.12.6)
#6

Here is what I get with java -version:

java version "9.0.1" Java(TM) SE Runtime Environment (build 9.0.1+11) Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)

when I try to import javabridge:

Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named javabridge

pip install javabridge also doesn’t seem to work:

Collecting javabridge Using cached javabridge-1.0.15.tar.gz Complete output from command python setup.py egg_info: No handlers could be found for logger "locate" Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/mk/wsmrq6g95ls8nyt3fznzjzl00000gn/T/pip-build-1ZB2AW/javabridge/setup.py", line 393, in <module> ext_modules=ext_modules(), File "/private/var/folders/mk/wsmrq6g95ls8nyt3fznzjzl00000gn/T/pip-build-1ZB2AW/javabridge/setup.py", line 95, in ext_modules raise Exception("JVM not found") Exception: JVM not found

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/mk/wsmrq6g95ls8nyt3fznzjzl00000gn/T/pip-build-1ZB2AW/javabridge/

How should I proceed?


#7

So indeed you couldn’t install javabridge.

can you first remove all the installed java please.

Especially do this

  • brew cask uninstall java

Once you’re done, try to install Java from a .dmg file from here:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

choose [macOS 247.06 MB jdk-8u151-macosx-x64.dmg]

Although this method goes against the preference of using brew install, but I observed it worked for some.

Once JRE is installed from .dmg, try again:

  • pip install javabridge

Good luck.


#8

I found out that in some user who has Java 9.0.1, removing Java by these 3 lines solves the problems:

  • sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.jdk/
  • sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
  • sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane

Hope it helps you too.


Trouble with 3.0.0 startup MacOS