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

Install error even though JDK is installed #168

Open
LizMcQuillan opened this issue Sep 12, 2019 · 5 comments
Open

Install error even though JDK is installed #168

LizMcQuillan opened this issue Sep 12, 2019 · 5 comments

Comments

@LizMcQuillan
Copy link

LizMcQuillan commented Sep 12, 2019

I'm using Python 3.7 on a Mac, for context.

Attempting to install using pip results in the following error:

Collecting javabridge==1.0.18
  Using cached https://files.pythonhosted.org/packages/a6/a0/c59bccabed99b1d4ac68166c59c679b375bfca75b78688b52c541b711578/javabridge-1.0.18.tar.gz
    Complete output from command python setup.py egg_info:
    Could not find Java JRE compatible with x86_64 architecture
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/04/76dktb_j6hj2qq9tx78jrzyc0000gp/T/pip-install-salp76k4/javabridge/setup.py", line 402, in <module>
        ext_modules=ext_modules(),
      File "/private/var/folders/04/76dktb_j6hj2qq9tx78jrzyc0000gp/T/pip-install-salp76k4/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/04/76dktb_j6hj2qq9tx78jrzyc0000gp/T/pip-install-salp76k4/javabridge/

with Conda results in the following error:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: / 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                                                                   
                                                                                                                                         
UnsatisfiableError: The following specifications were found                                                                              
to be incompatible with the existing python installation in your environment:

  - javabridge -> python[version='2.7.*|3.4.*|3.5.*|3.6.*']
  - javabridge -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0']

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to.  Your current python version
is (python=3.7).  Note that conda will not change your python version to a different minor version
unless you explicitly specify that.

The following specifications were found to be incompatible with each other:

Package setuptools conflicts for:
javabridge -> setuptools
python=3.7 -> pip -> setuptools
Package ca-certificates conflicts for:
python=3.7 -> openssl[version='>=1.1.1a,<1.1.2a'] -> ca-certificates
javabridge -> python=3.5 -> ca-certificates
Package pip conflicts for:
javabridge -> python=3.5 -> pip
python=3.7 -> pip
Package certifi conflicts for:
python=3.7 -> pip -> setuptools -> certifi[version='>=2016.09']
Package wheel conflicts for:
javabridge -> python=3.5 -> pip -> wheel
python=3.7 -> pip -> wheel

I've uninstalled and reinstalled JDK and Java after reading other issues, so I'm not sure what else to try.

@LeeKamentsky
Copy link
Owner

LeeKamentsky commented Sep 13, 2019 via email

@LizMcQuillan
Copy link
Author

I've tried setting JAVA_HOME, also tried reinstalling JDK and Java altogether. All to no avail.

@ptth222
Copy link

ptth222 commented May 26, 2020

I had essentially the same error and fixed it using

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home

I did not try by using the new JDK 14.

@LizMcQuillan
Copy link
Author

In the end, the only thing that worked was creating a fresh virtual env and doing all the installations over again.

@ghost
Copy link

ghost commented Oct 9, 2020

I was running into the same issue. Here's what worked for me:

  1. Make sure you have JAVA SDK8 installed
    • Installation was not working for me with SDK14, and only worked when I installed SDK 8
    • To check which versions you have installed (there may be multiple): /usr/libexec/java_home -V
    • If you need to install SDK 8, download from Oracle here
  2. Make sure that JAVA_HOME is pointing to the correct place!
    • Find the path corresponding to SDK 8 using: /usr/libexec/java_home -V
    • export that path to JAVA_HOME
      • Example for my machine: export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_261.jdk/Contents/Home"
  3. pip install javabridge

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

3 participants