I am on Debian 11, Python 3.9.7
I have installed java OpenJDK 11 (Current version I think is 17, but for some software I need 11)
(base) ~$ whereis java
java: /usr/bin/java /usr/share/java /home/daniel/jdk-11.0.15+10/bin/java /usr/share/man/man1/java.1.gz
The java version:
(base) ~$ java --version
openjdk 11.0.15 2022-04-19
OpenJDK Runtime Environment Temurin-11.0.15+10 (build 11.0.15+10)
OpenJDK 64-Bit Server VM Temurin-11.0.15+10 (build 11.0.15+10, mixed mode)
Also defined JAVA_HOME:
(base) daniel@tuxysbu:~$ echo $JAVA_HOME
/usr/lib/jvm/java-11-openjdk-amd64/bin/java
I have installed Anaconda, pip install javabridge, pip install python-bioformats
However, when I try to import javabridge, I got the following error:
import javabridge
Traceback (most recent call last):
File "/tmp/ipykernel_227911/3278431438.py", line 1, in <module>
import javabridge
File "/home/daniel/anaconda3/lib/python3.9/site-packages/javabridge/__init__.py", line 38, in <module>
from .jutil import start_vm, kill_vm, vm, activate_awt, deactivate_awt
File "/home/daniel/anaconda3/lib/python3.9/site-packages/javabridge/jutil.py", line 157, in <module>
import javabridge._javabridge as _javabridge
ModuleNotFoundError: No module named 'javabridge._javabridge'
If anyone has an idea why this problem, please, let me know
thanks
2
Answers
Make sure the IDE you are using is in the correct anaconda environment. I had a similar problem once and all I did was change my anaconda environment in visual studio code(the IDE I use).
It looks a problem with java/javac
Better re-install it.
Try:
This should fix it