Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install javabridge fails Debian bookworm #204

Open
danielcanals2017 opened this issue Jun 10, 2022 · 2 comments
Open

pip install javabridge fails Debian bookworm #204

danielcanals2017 opened this issue Jun 10, 2022 · 2 comments

Comments

@danielcanals2017
Copy link

danielcanals2017 commented Jun 10, 2022

Hi,

I am running Python 3.9.12. When I try to install javabridge, I get:

This is the complete message:

~$ pip install javabridge
Collecting javabridge
  Using cached javabridge-1.0.19.tar.gz (1.3 MB)
Requirement already satisfied: numpy in ./anaconda3/lib/python3.9/site-packages (from javabridge) (1.21.5)
Building wheels for collected packages: javabridge
  Building wheel for javabridge (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/daniel/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-s0lz53l9/javabridge_b94975d5c7214110afb660100a3389ac/setup.py'"'"'; __file__='"'"'/tmp/pip-install-s0lz53l9/javabridge_b94975d5c7214110afb660100a3389ac/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-j5rddnbt
       cwd: /tmp/pip-install-s0lz53l9/javabridge_b94975d5c7214110afb660100a3389ac/
  Complete output (27 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.9
  creating build/lib.linux-x86_64-3.9/javabridge
  copying javabridge/locate.py -> build/lib.linux-x86_64-3.9/javabridge
  copying javabridge/jutil.py -> build/lib.linux-x86_64-3.9/javabridge
  copying javabridge/__init__.py -> build/lib.linux-x86_64-3.9/javabridge
  copying javabridge/_version.py -> build/lib.linux-x86_64-3.9/javabridge
  copying javabridge/wrappers.py -> build/lib.linux-x86_64-3.9/javabridge
  copying javabridge/noseplugin.py -> build/lib.linux-x86_64-3.9/javabridge
  creating build/lib.linux-x86_64-3.9/javabridge/tests
  copying javabridge/tests/test_cpython.py -> build/lib.linux-x86_64-3.9/javabridge/tests
  copying javabridge/tests/test_wrappers.py -> build/lib.linux-x86_64-3.9/javabridge/tests
  copying javabridge/tests/__init__.py -> build/lib.linux-x86_64-3.9/javabridge/tests
  copying javabridge/tests/test_javabridge.py -> build/lib.linux-x86_64-3.9/javabridge/tests
  copying javabridge/tests/test_jutil.py -> build/lib.linux-x86_64-3.9/javabridge/tests
  creating build/lib.linux-x86_64-3.9/javabridge/jars
  copying javabridge/jars/runnablequeue.jar -> build/lib.linux-x86_64-3.9/javabridge/jars
  copying javabridge/jars/rhino-1.7R4.jar -> build/lib.linux-x86_64-3.9/javabridge/jars
  copying javabridge/jars/test.jar -> build/lib.linux-x86_64-3.9/javabridge/jars
  copying javabridge/jars/cpython.jar -> build/lib.linux-x86_64-3.9/javabridge/jars
  copying javabridge/jars/libjava2cpython.so -> build/lib.linux-x86_64-3.9/javabridge/jars
  running build_ext
  javac /tmp/pip-install-s0lz53l9/javabridge_b94975d5c7214110afb660100a3389ac/java/org/cellprofiler/runnablequeue/RunnableQueue.java
  error: command 'javac' failed: No such file or directory
  ----------------------------------------
  ERROR: Failed building wheel for javabridge
  Running setup.py clean for javabridge
Failed to build javabridge
Installing collected packages: javabridge
    Running setup.py install for javabridge ... error
    ERROR: Command errored out with exit status 1:
     command: /home/daniel/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-s0lz53l9/javabridge_b94975d5c7214110afb660100a3389ac/setup.py'"'"'; __file__='"'"'/tmp/pip-install-s0lz53l9/javabridge_b94975d5c7214110afb660100a3389ac/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-p0d0e4jr/install-record.txt --single-version-externally-managed --compile --install-headers /home/daniel/anaconda3/include/python3.9/javabridge
         cwd: /tmp/pip-install-s0lz53l9/javabridge_b94975d5c7214110afb660100a3389ac/
    Complete output (29 lines):
    running install
    /home/daniel/anaconda3/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.9
    creating build/lib.linux-x86_64-3.9/javabridge
    copying javabridge/locate.py -> build/lib.linux-x86_64-3.9/javabridge
    copying javabridge/jutil.py -> build/lib.linux-x86_64-3.9/javabridge
    copying javabridge/__init__.py -> build/lib.linux-x86_64-3.9/javabridge
    copying javabridge/_version.py -> build/lib.linux-x86_64-3.9/javabridge
    copying javabridge/wrappers.py -> build/lib.linux-x86_64-3.9/javabridge
    copying javabridge/noseplugin.py -> build/lib.linux-x86_64-3.9/javabridge
    creating build/lib.linux-x86_64-3.9/javabridge/tests
    copying javabridge/tests/test_cpython.py -> build/lib.linux-x86_64-3.9/javabridge/tests
    copying javabridge/tests/test_wrappers.py -> build/lib.linux-x86_64-3.9/javabridge/tests
    copying javabridge/tests/__init__.py -> build/lib.linux-x86_64-3.9/javabridge/tests
    copying javabridge/tests/test_javabridge.py -> build/lib.linux-x86_64-3.9/javabridge/tests
    copying javabridge/tests/test_jutil.py -> build/lib.linux-x86_64-3.9/javabridge/tests
    creating build/lib.linux-x86_64-3.9/javabridge/jars
    copying javabridge/jars/runnablequeue.jar -> build/lib.linux-x86_64-3.9/javabridge/jars
    copying javabridge/jars/rhino-1.7R4.jar -> build/lib.linux-x86_64-3.9/javabridge/jars
    copying javabridge/jars/test.jar -> build/lib.linux-x86_64-3.9/javabridge/jars
    copying javabridge/jars/cpython.jar -> build/lib.linux-x86_64-3.9/javabridge/jars
    copying javabridge/jars/libjava2cpython.so -> build/lib.linux-x86_64-3.9/javabridge/jars
    running build_ext
    javac /tmp/pip-install-s0lz53l9/javabridge_b94975d5c7214110afb660100a3389ac/java/org/cellprofiler/runnablequeue/RunnableQueue.java
    error: command 'javac' failed: No such file or directory
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/daniel/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-s0lz53l9/javabridge_b94975d5c7214110afb660100a3389ac/setup.py'"'"'; __file__='"'"'/tmp/pip-install-s0lz53l9/javabridge_b94975d5c7214110afb660100a3389ac/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-p0d0e4jr/install-record.txt --single-version-externally-managed --compile --install-headers /home/daniel/anaconda3/include/python3.9/javabridge Check the logs for full command output.

From other issues, I tried many of the proposed solutions, but all failed.
I have defined JAVA_HOME in .bashrc

$ echo $JAVA_HOME
/usr/lib/jvm/java-11-openjdk-amd64

I have included JAVA_HOME/bin in PATH

echo $PATH
/home/daniel/Dropbox/Biotools/FastQC:/home/daniel/Dropbox/Biotools/bin:/home/daniel/Dropbox/Biotools/STAR:/home/daniel/anaconda3/bin:/home/daniel/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/lib/jvm/java-11-openjdk-amd64/bin

JAva is running:

$ java --version
openjdk 11.0.14.1 2022-02-08
OpenJDK Runtime Environment (build 11.0.14.1+1-post-Debian-1)
OpenJDK 64-Bit Server VM (build 11.0.14.1+1-post-Debian-1, mixed mode, sharing)

Thank you

@LeeKamentsky
Copy link
Owner

That is bizarre - obviously the problem is that setup can't run javac, but you do have the JDK installed. Can you do
javac -version?

@danielcanals2017
Copy link
Author

Thank you for your reply.
The output of this command is:
$ javac -version
javac 11.0.15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants