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

Failed to create a JVM with the requested environment. #291

Open
JeBiUKD opened this issue Nov 3, 2023 · 6 comments
Open

Failed to create a JVM with the requested environment. #291

JeBiUKD opened this issue Nov 3, 2023 · 6 comments

Comments

@JeBiUKD
Copy link

JeBiUKD commented Nov 3, 2023

Dear all,

I have been working successfully with the package before but face problems when setting up PyImageJ on a different computer.

The problem already occurs in the initialization.

Here is a minimal script:

import imagej
ij = imagej.init(mode='interactive')

Error message:

JVMNotFoundException Traceback (most recent call last)
Cell In[1], line 4
2 import imagej
3 # os.environ["JAVA_HOME"] ="C:/ProgramData/Miniconda3/envs/kymo/Library/jre/bin/server"
----> 4 ij = imagej.init(mode='interactive')

File C:\ProgramData\Miniconda3\envs\kymo\lib\site-packages\imagej_init_.py:1200, in init(ij_dir_or_version_or_endpoint, mode, add_legacy, headless)
1197 raise EnvironmentError("Sorry, the interactive mode is not available on macOS.")
1199 if not sj.jvm_started():
-> 1200 success = _create_jvm(ij_dir_or_version_or_endpoint, mode, add_legacy)
1201 if not success:
1202 raise RuntimeError("Failed to create a JVM with the requested environment.")

File C:\ProgramData\Miniconda3\envs\kymo\lib\site-packages\imagej_init_.py:1318, in _create_jvm(ij_dir_or_version_or_endpoint, mode, add_legacy)
1316 sj.config.add_option("-Djava.awt.headless=true")
1317 try:
-> 1318 if hasattr(sj, "jvm_version") and sj.jvm_version()[0] >= 9:
1319 # Disable illegal reflection access warnings.
1320 sj.config.add_option("--add-opens=java.base/java.lang=ALL-UNNAMED")
1321 sj.config.add_option("--add-opens=java.base/java.util=ALL-UNNAMED")

File C:\ProgramData\Miniconda3\envs\kymo\lib\site-packages\scyjava_java.py:121, in jvm_version()
116 return jvm_version
118 # JPype was clueless, which means the JVM has probably not started yet.
119 # Let's look for a java executable, and ask via 'java -version'.
--> 121 default_jvm_path = jpype.getDefaultJVMPath()
122 if not default_jvm_path:
123 raise RuntimeError("Cannot glean the default JVM path")

File C:\ProgramData\Miniconda3\envs\kymo\lib\site-packages\jpype_jvmfinder.py:74, in getDefaultJVMPath()
72 else:
73 finder = LinuxJVMFinder()
---> 74 return finder.get_jvm_path()

File C:\ProgramData\Miniconda3\envs\kymo\lib\site-packages\jpype_jvmfinder.py:212, in JVMFinder.get_jvm_path(self)
210 if jvm_notsupport_ext is not None:
211 raise jvm_notsupport_ext
--> 212 raise JVMNotFoundException("No JVM shared library file ({0}) "
213 "found. Try setting up the JAVA_HOME "
214 "environment variable properly."
215 .format(self._libfile))

JVMNotFoundException: No JVM shared library file (jvm.dll) found. Try setting up the JAVA_HOME environment variable properly.

I then tried to set the JAVA_HOME environment:

import imagej
import os
import imagej.doctor
imagej.doctor.debug_to_stderr()

os.environ["JAVA_HOME"] ="C:\Program Files\AdoptOpenJDK\jre-8.0.242.08-hotspot"
# ij = imagej.init('2.9.0')
ij = imagej.init(mode='interactive')

Then I get the following error message:

Using newest ImageJ2 release
Using newest ImageJ2 release
Adding jars from endpoints ['net.imagej:imagej', 'net.imagej:imagej-legacy:MANAGED', 'org.scijava:scijava-config:MANAGED', 'io.scif:scifio-labeling:0.3.1', 'net.imglib2:imglib2-imglyb:1.1.0']
Adding jars from endpoints ['net.imagej:imagej', 'net.imagej:imagej-legacy:MANAGED', 'org.scijava:scijava-config:MANAGED', 'io.scif:scifio-labeling:0.3.1', 'net.imglib2:imglib2-imglyb:1.1.0']
Using endpoints ['net.imagej:imagej', 'io.scif:scifio-labeling:0.3.1', 'net.imagej:imagej-legacy:MANAGED', 'net.imglib2:imglib2-imglyb:1.1.0', 'org.scijava:scijava-config:MANAGED']
Using endpoints ['net.imagej:imagej', 'io.scif:scifio-labeling:0.3.1', 'net.imagej:imagej-legacy:MANAGED', 'net.imglib2:imglib2-imglyb:1.1.0', 'org.scijava:scijava-config:MANAGED']
Getting verbose level: 0
Getting verbose level: 0
Getting verbose level: 0
Getting verbose level: 0
Returning expanded coordinate net.imagej:imagej.
Returning expanded coordinate net.imagej:imagej.
Returning expanded coordinate io.scif:scifio-labeling:0.3.1.
Returning expanded coordinate io.scif:scifio-labeling:0.3.1.
Returning expanded coordinate net.imagej:imagej-legacy:MANAGED.
Returning expanded coordinate net.imagej:imagej-legacy:MANAGED.
Returning expanded coordinate net.imglib2:imglib2-imglyb:1.1.0.
Returning expanded coordinate net.imglib2:imglib2-imglyb:1.1.0.
Returning expanded coordinate org.scijava:scijava-config:MANAGED.
Returning expanded coordinate org.scijava:scijava-config:MANAGED.
First time start-up may be slow. Downloaded dependencies will be cached for shorter start-up times in subsequent executions.
First time start-up may be slow. Downloaded dependencies will be cached for shorter start-up times in subsequent executions.
Executing: ('C:\ProgramData\Miniconda3\envs\kymo\Library\bin\mvn.CMD', '-B', '-f', 'C:\Users\BellmanJe\.jgo\net.imagej\imagej\RELEASE\5dacb2d74cc139236f7db62ac3391755ef26a277311eab7c4c9f89d2892a0367\pom.xml', 'dependency:resolve')
Executing: ('C:\ProgramData\Miniconda3\envs\kymo\Library\bin\mvn.CMD', '-B', '-f', 'C:\Users\BellmanJe\.jgo\net.imagej\imagej\RELEASE\5dacb2d74cc139236f7db62ac3391755ef26a277311eab7c4c9f89d2892a0367\pom.xml', 'dependency:resolve')
Failed to bootstrap the artifact.
Failed to bootstrap the artifact.

Possible solutions:
Possible solutions:

  • Double check the endpoint for correctness (https://search.maven.org/).
  • Double check the endpoint for correctness (https://search.maven.org/).
  • Add needed repositories to ~/.jgorc [repositories] block (see README).
  • Add needed repositories to ~/.jgorc [repositories] block (see README).
  • Try with an explicit version number (release metadata might be wrong).
  • Try with an explicit version number (release metadata might be wrong).

Full Maven error output:
Full Maven error output:
[INFO] Scanning for projects...
[INFO] Scanning for projects...
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/net/imagej/imagej/maven-metadata.xml
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/net/imagej/imagej/maven-metadata.xml
[WARNING] Could not transfer metadata net.imagej:imagej/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.64.215, repo.maven.apache.org/151.101.128.215, repo.maven.apache.org/151.101.192.215, repo.maven.apache.org/151.101.0.215] failed: connect timed out
[WARNING] Could not transfer metadata net.imagej:imagej/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.64.215, repo.maven.apache.org/151.101.128.215, repo.maven.apache.org/151.101.192.215, repo.maven.apache.org/151.101.0.215] failed: connect timed out
[WARNING]
[WARNING]
[WARNING] Some problems were encountered while building the effective model for net.imagej-BOOTSTRAPPER:imagej-BOOTSTRAPPER:jar:0
[WARNING] Some problems were encountered while building the effective model for net.imagej-BOOTSTRAPPER:imagej-BOOTSTRAPPER:jar:0
[WARNING] 'dependencies.dependency.version' for net.imagej:imagej:jar is either LATEST or RELEASE (both of them are being deprecated) @ line 10, column 97
[WARNING] 'dependencies.dependency.version' for net.imagej:imagej:jar is either LATEST or RELEASE (both of them are being deprecated) @ line 10, column 97
[WARNING] 'dependencyManagement.dependencies.dependency.version' for net.imagej:imagej:pom is either LATEST or RELEASE (both of them are being deprecated) @ line 8, column 98
[WARNING] 'dependencyManagement.dependencies.dependency.version' for net.imagej:imagej:pom is either LATEST or RELEASE (both of them are being deprecated) @ line 8, column 98
[WARNING]
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[WARNING]
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/3.2.0/maven-clean-plugin-3.2.0.pom
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/3.2.0/maven-clean-plugin-3.2.0.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:3.2.0: Plugin org.apache.maven.plugins:maven-clean-plugin:3.2.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:3.2.0
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:3.2.0: Plugin org.apache.maven.plugins:maven-clean-plugin:3.2.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:3.2.0
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/3.3.1/maven-resources-plugin-3.3.1.pom
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/3.3.1/maven-resources-plugin-3.3.1.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-resources-plugin:3.3.1: Plugin org.apache.maven.plugins:maven-resources-plugin:3.3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:3.3.1
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-resources-plugin:3.3.1: Plugin org.apache.maven.plugins:maven-resources-plugin:3.3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:3.3.1
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/3.3.0/maven-jar-plugin-3.3.0.pom
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-jar-plugin/3.3.0/maven-jar-plugin-3.3.0.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-jar-plugin:3.3.0: Plugin org.apache.maven.plugins:maven-jar-plugin:3.3.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-jar-plugin:jar:3.3.0
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-jar-plugin:3.3.0: Plugin org.apache.maven.plugins:maven-jar-plugin:3.3.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-jar-plugin:jar:3.3.0
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/3.11.0/maven-compiler-plugin-3.11.0.pom
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/3.11.0/maven-compiler-plugin-3.11.0.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-compiler-plugin:3.11.0: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.11.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:3.11.0
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-compiler-plugin:3.11.0: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.11.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:3.11.0
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/3.1.2/maven-surefire-plugin-3.1.2.pom
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/3.1.2/maven-surefire-plugin-3.1.2.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-surefire-plugin:3.1.2: Plugin org.apache.maven.plugins:maven-surefire-plugin:3.1.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-surefire-plugin:jar:3.1.2
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-surefire-plugin:3.1.2: Plugin org.apache.maven.plugins:maven-surefire-plugin:3.1.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-surefire-plugin:jar:3.1.2
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/3.1.1/maven-install-plugin-3.1.1.pom
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/3.1.1/maven-install-plugin-3.1.1.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-install-plugin:3.1.1: Plugin org.apache.maven.plugins:maven-install-plugin:3.1.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:3.1.1
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-install-plugin:3.1.1: Plugin org.apache.maven.plugins:maven-install-plugin:3.1.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:3.1.1
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/3.1.1/maven-deploy-plugin-3.1.1.pom
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/3.1.1/maven-deploy-plugin-3.1.1.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-deploy-plugin:3.1.1: Plugin org.apache.maven.plugins:maven-deploy-plugin:3.1.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-deploy-plugin:jar:3.1.1
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-deploy-plugin:3.1.1: Plugin org.apache.maven.plugins:maven-deploy-plugin:3.1.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-deploy-plugin:jar:3.1.1
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-site-plugin/3.12.1/maven-site-plugin-3.12.1.pom
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-site-plugin/3.12.1/maven-site-plugin-3.12.1.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-site-plugin:3.12.1: Plugin org.apache.maven.plugins:maven-site-plugin:3.12.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-site-plugin:jar:3.12.1
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-site-plugin:3.12.1: Plugin org.apache.maven.plugins:maven-site-plugin:3.12.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-site-plugin:jar:3.12.1
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-antrun-plugin/3.1.0/maven-antrun-plugin-3.1.0.pom
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-antrun-plugin/3.1.0/maven-antrun-plugin-3.1.0.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-antrun-plugin:3.1.0: Plugin org.apache.maven.plugins:maven-antrun-plugin:3.1.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-antrun-plugin:jar:3.1.0
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-antrun-plugin:3.1.0: Plugin org.apache.maven.plugins:maven-antrun-plugin:3.1.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-antrun-plugin:jar:3.1.0
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-assembly-plugin/3.6.0/maven-assembly-plugin-3.6.0.pom
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-assembly-plugin/3.6.0/maven-assembly-plugin-3.6.0.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-assembly-plugin:3.6.0: Plugin org.apache.maven.plugins:maven-assembly-plugin:3.6.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-assembly-plugin:jar:3.6.0
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-assembly-plugin:3.6.0: Plugin org.apache.maven.plugins:maven-assembly-plugin:3.6.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-assembly-plugin:jar:3.6.0
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/3.6.0/maven-dependency-plugin-3.6.0.pom
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/3.6.0/maven-dependency-plugin-3.6.0.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-dependency-plugin:3.6.0: Plugin org.apache.maven.plugins:maven-dependency-plugin:3.6.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:3.6.0
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-dependency-plugin:3.6.0: Plugin org.apache.maven.plugins:maven-dependency-plugin:3.6.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:3.6.0
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-release-plugin/3.0.1/maven-release-plugin-3.0.1.pom
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-release-plugin/3.0.1/maven-release-plugin-3.0.1.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-release-plugin:3.0.1: Plugin org.apache.maven.plugins:maven-release-plugin:3.0.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-release-plugin:jar:3.0.1
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-release-plugin:3.0.1: Plugin org.apache.maven.plugins:maven-release-plugin:3.0.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-release-plugin:jar:3.0.1
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.64.215, repo.maven.apache.org/151.101.128.215, repo.maven.apache.org/151.101.192.215, repo.maven.apache.org/151.101.0.215] failed: connect timed out
[WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.64.215, repo.maven.apache.org/151.101.128.215, repo.maven.apache.org/151.101.192.215, repo.maven.apache.org/151.101.0.215] failed: connect timed out
[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.64.215, repo.maven.apache.org/151.101.128.215, repo.maven.apache.org/151.101.192.215, repo.maven.apache.org/151.101.0.215] failed: connect timed out
[WARNING] Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.64.215, repo.maven.apache.org/151.101.128.215, repo.maven.apache.org/151.101.192.215, repo.maven.apache.org/151.101.0.215] failed: connect timed out
[WARNING] org.apache.maven.plugins/maven-metadata.xml failed to transfer from https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.64.215, repo.maven.apache.org/151.101.128.215, repo.maven.apache.org/151.101.192.215, repo.maven.apache.org/151.101.0.215] failed: connect timed out
[WARNING] org.apache.maven.plugins/maven-metadata.xml failed to transfer from https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata org.apache.maven.plugins/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.64.215, repo.maven.apache.org/151.101.128.215, repo.maven.apache.org/151.101.192.215, repo.maven.apache.org/151.101.0.215] failed: connect timed out
[WARNING] org.codehaus.mojo/maven-metadata.xml failed to transfer from https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.64.215, repo.maven.apache.org/151.101.128.215, repo.maven.apache.org/151.101.192.215, repo.maven.apache.org/151.101.0.215] failed: connect timed out
[WARNING] org.codehaus.mojo/maven-metadata.xml failed to transfer from https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer metadata org.codehaus.mojo/maven-metadata.xml from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.64.215, repo.maven.apache.org/151.101.128.215, repo.maven.apache.org/151.101.192.215, repo.maven.apache.org/151.101.0.215] failed: connect timed out
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 09:21 min
[INFO] Total time: 09:21 min
[INFO] Finished at: 2023-11-03T10:23:17+01:00
[INFO] Finished at: 2023-11-03T10:23:17+01:00
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'dependency' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\BellmanJe.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR] No plugin found for prefix 'dependency' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\BellmanJe.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException


RuntimeError Traceback (most recent call last)
Cell In[2], line 8
6 os.environ["JAVA_HOME"] ="C:\Program Files\AdoptOpenJDK\jre-8.0.242.08-hotspot"
7 # ij = imagej.init('2.9.0')
----> 8 ij = imagej.init(mode='interactive')
9 ij.ui().showUI()

File C:\ProgramData\Miniconda3\envs\kymo\lib\site-packages\imagej_init_.py:1202, in init(ij_dir_or_version_or_endpoint, mode, add_legacy, headless)
1200 success = _create_jvm(ij_dir_or_version_or_endpoint, mode, add_legacy)
1201 if not success:
-> 1202 raise RuntimeError("Failed to create a JVM with the requested environment.")
1204 if mode == Mode.GUI:
1205 # Show the GUI and block.
1206 if macos:
1207 # NB: This will block the calling (main) thread forever!

RuntimeError: Failed to create a JVM with the requested environment.

Here is my conda environment list:

packages in environment at C:\ProgramData\Miniconda3\envs\kymo:

Name Version Build Channel

aiofiles 22.1.0 pyhd8ed1ab_0 conda-forge
aiosqlite 0.19.0 pyhd8ed1ab_0 conda-forge
anyio 4.0.0 pyhd8ed1ab_0 conda-forge
aom 3.5.0 h63175ca_0 conda-forge
argon2-cffi 23.1.0 pyhd8ed1ab_0 conda-forge
argon2-cffi-bindings 21.2.0 py38h91455d4_4 conda-forge
arrow 1.3.0 pyhd8ed1ab_0 conda-forge
asttokens 2.4.1 pyhd8ed1ab_0 conda-forge
async-lru 2.0.4 pyhd8ed1ab_0 conda-forge
attrs 23.1.0 pyh71513ae_1 conda-forge
babel 2.13.1 pyhd8ed1ab_0 conda-forge
backcall 0.2.0 pyh9f0ad1d_0 conda-forge
backports 1.0 pyhd8ed1ab_3 conda-forge
backports.functools_lru_cache 1.6.5 pyhd8ed1ab_0 conda-forge
beautifulsoup4 4.12.2 pyha770c72_0 conda-forge
bleach 6.1.0 pyhd8ed1ab_0 conda-forge
blosc 1.21.5 hdccc3a2_0 conda-forge
brotli 1.0.9 h0e60522_4 conda-forge
brotli-python 1.0.9 py38hd3f51b4_9 conda-forge
bzip2 1.0.8 h8ffe710_4 conda-forge
c-blosc2 2.10.5 h183a6f4_0 conda-forge
ca-certificates 2023.7.22 h56e8100_0 conda-forge
cached-property 1.5.2 hd8ed1ab_1 conda-forge
cached_property 1.5.2 pyha770c72_1 conda-forge
certifi 2023.7.22 pyhd8ed1ab_0 conda-forge
cffi 1.16.0 py38h91455d4_0 conda-forge
cfitsio 4.2.0 h9ebe7e4_0 conda-forge
charls 2.4.2 h1537add_0 conda-forge
charset-normalizer 3.3.1 pyhd8ed1ab_0 conda-forge
colorama 0.4.6 pyhd8ed1ab_0 conda-forge
comm 0.1.4 pyhd8ed1ab_0 conda-forge
contourpy 1.1.1 py38hb1fd069_1 conda-forge
cryptography 41.0.5 py38h95f5157_0 conda-forge
cycler 0.12.1 pyhd8ed1ab_0 conda-forge
dav1d 1.2.1 hcfcfb64_0 conda-forge
debugpy 1.8.0 py38hd3f51b4_1 conda-forge
decorator 5.1.1 pyhd8ed1ab_0 conda-forge
defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge
entrypoints 0.4 pyhd8ed1ab_0 conda-forge
exceptiongroup 1.1.3 pyhd8ed1ab_0 conda-forge
executing 2.0.1 pyhd8ed1ab_0 conda-forge
fonttools 4.43.1 py38h91455d4_0 conda-forge
fqdn 1.5.1 pyhd8ed1ab_0 conda-forge
freetype 2.12.1 hdaf720e_2 conda-forge
gettext 0.21.1 h5728263_0 conda-forge
giflib 5.2.1 h64bf75a_3 conda-forge
glib 2.78.0 h12be248_0 conda-forge
glib-tools 2.78.0 h12be248_0 conda-forge
gst-plugins-base 1.22.6 h001b923_2 conda-forge
gstreamer 1.22.6 hb4038d2_2 conda-forge
icu 70.1 h0e60522_0 conda-forge
idna 3.4 pyhd8ed1ab_0 conda-forge
imagecodecs 2023.1.23 py38h38923f3_0 conda-forge
imglyb 2.1.0 pyha21a80b_0 conda-forge
importlib-metadata 6.8.0 pyha770c72_0 conda-forge
importlib-resources 6.1.0 pyhd8ed1ab_0 conda-forge
importlib_metadata 6.8.0 hd8ed1ab_0 conda-forge
importlib_resources 6.1.0 pyhd8ed1ab_0 conda-forge
intel-openmp 2023.2.0 h57928b3_50497 conda-forge
ipykernel 6.26.0 pyha63f2e9_0 conda-forge
ipython 8.12.2 pyh08f2357_0 conda-forge
ipython_genutils 0.2.0 py_1 conda-forge
ipywidgets 8.1.1 pyhd8ed1ab_0 conda-forge
isoduration 20.11.0 pyhd8ed1ab_0 conda-forge
jedi 0.19.1 pyhd8ed1ab_0 conda-forge
jgo 1.0.5 pyhd8ed1ab_0 conda-forge
jinja2 3.1.2 pyhd8ed1ab_1 conda-forge
jpeg 9e hcfcfb64_3 conda-forge
jpype1 1.4.1 py38hb1fd069_1 conda-forge
json5 0.9.14 pyhd8ed1ab_0 conda-forge
jsonpointer 2.4 py38haa244fe_3 conda-forge
jsonschema 4.19.2 pyhd8ed1ab_0 conda-forge
jsonschema-specifications 2023.7.1 pyhd8ed1ab_0 conda-forge
jsonschema-with-format-nongpl 4.19.2 pyhd8ed1ab_0 conda-forge
jupyter 1.0.0 pyhd8ed1ab_10 conda-forge
jupyter-lsp 2.2.0 pyhd8ed1ab_0 conda-forge
jupyter_client 8.5.0 pyhd8ed1ab_0 conda-forge
jupyter_console 6.6.3 pyhd8ed1ab_0 conda-forge
jupyter_core 5.5.0 py38haa244fe_0 conda-forge
jupyter_events 0.8.0 pyhd8ed1ab_0 conda-forge
jupyter_server 2.9.1 pyhd8ed1ab_0 conda-forge
jupyter_server_fileid 0.9.0 pyhd8ed1ab_0 conda-forge
jupyter_server_terminals 0.4.4 pyhd8ed1ab_1 conda-forge
jupyter_server_ydoc 0.8.0 pyhd8ed1ab_0 conda-forge
jupyter_ydoc 0.3.4 pyhd8ed1ab_0 conda-forge
jupyterlab 4.0.7 pyhd8ed1ab_0 conda-forge
jupyterlab_pygments 0.2.2 pyhd8ed1ab_0 conda-forge
jupyterlab_server 2.25.0 pyhd8ed1ab_0 conda-forge
jupyterlab_widgets 3.0.9 pyhd8ed1ab_0 conda-forge
jxrlib 1.1 h8ffe710_2 conda-forge
kiwisolver 1.4.5 py38hb1fd069_1 conda-forge
krb5 1.20.1 heb0366b_0 conda-forge
labeling 0.1.12 pyhd8ed1ab_1 conda-forge
lcms2 2.15 ha5c8aab_0 conda-forge
lerc 4.0.0 h63175ca_0 conda-forge
libaec 1.1.2 h63175ca_1 conda-forge
libavif 0.11.1 ha7b97ba_2 conda-forge
libblas 3.9.0 19_win64_mkl conda-forge
libbrotlicommon 1.0.9 hcfcfb64_9 conda-forge
libbrotlidec 1.0.9 hcfcfb64_9 conda-forge
libbrotlienc 1.0.9 hcfcfb64_9 conda-forge
libcblas 3.9.0 19_win64_mkl conda-forge
libclang 15.0.7 default_h77d9078_3 conda-forge
libclang13 15.0.7 default_h77d9078_3 conda-forge
libcurl 8.1.2 h68f0423_0 conda-forge
libdeflate 1.17 hcfcfb64_0 conda-forge
libffi 3.4.2 h8ffe710_5 conda-forge
libglib 2.78.0 he8f3873_0 conda-forge
libhwloc 2.9.3 default_haede6df_1009 conda-forge
libiconv 1.17 h8ffe710_0 conda-forge
liblapack 3.9.0 19_win64_mkl conda-forge
libogg 1.3.4 h8ffe710_1 conda-forge
libpng 1.6.39 h19919ed_0 conda-forge
libpq 15.3 ha9684e8_1 conda-forge
libsodium 1.0.18 h8d14728_1 conda-forge
libsqlite 3.43.2 hcfcfb64_0 conda-forge
libssh2 1.11.0 h7dfc565_0 conda-forge
libtiff 4.5.0 hf8721a0_2 conda-forge
libvorbis 1.3.7 h0e60522_0 conda-forge
libwebp-base 1.3.2 hcfcfb64_0 conda-forge
libxcb 1.13 hcd874cb_1004 conda-forge
libxml2 2.11.5 hc3477c8_1 conda-forge
libxslt 1.1.37 h6070c61_1 conda-forge
libzlib 1.2.13 hcfcfb64_5 conda-forge
libzopfli 1.0.3 h0e60522_0 conda-forge
lxml 4.9.3 py38h5a3a0f9_1 conda-forge
lz4-c 1.9.4 hcfcfb64_0 conda-forge
m2w64-gcc-libgfortran 5.3.0 6 conda-forge
m2w64-gcc-libs 5.3.0 7 conda-forge
m2w64-gcc-libs-core 5.3.0 7 conda-forge
m2w64-gmp 6.1.0 2 conda-forge
m2w64-libwinpthread-git 5.0.0.4634.697f757 2 conda-forge
markupsafe 2.1.3 py38h91455d4_1 conda-forge
matplotlib-base 3.7.3 py38h2724991_0 conda-forge
matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge
maven 3.9.5 h57928b3_0 conda-forge
mistune 3.0.1 pyhd8ed1ab_0 conda-forge
mkl 2023.2.0 h6a75c08_50496 conda-forge
msys2-conda-epoch 20160418 1 conda-forge
munkres 1.1.4 pyh9f0ad1d_0 conda-forge
nbclassic 1.0.0 pyhb4ecaf3_1 conda-forge
nbclient 0.8.0 pyhd8ed1ab_0 conda-forge
nbconvert 7.10.0 pyhd8ed1ab_0 conda-forge
nbconvert-core 7.10.0 pyhd8ed1ab_0 conda-forge
nbconvert-pandoc 7.10.0 pyhd8ed1ab_0 conda-forge
nbformat 5.9.2 pyhd8ed1ab_0 conda-forge
nest-asyncio 1.5.8 pyhd8ed1ab_0 conda-forge
notebook 7.0.6 pyhd8ed1ab_0 conda-forge
notebook-shim 0.2.3 pyhd8ed1ab_0 conda-forge
numpy 1.24.4 py38h1d91fd2_0 conda-forge
openjdk 8.0.382 h57928b3_0 conda-forge
openjpeg 2.5.0 ha2aaf27_2 conda-forge
openssl 3.1.4 hcfcfb64_0 conda-forge
overrides 7.4.0 pyhd8ed1ab_0 conda-forge
packaging 23.2 pyhd8ed1ab_0 conda-forge
pandas 1.5.3 py38h5846ac1_1 conda-forge
pandoc 3.1.3 h57928b3_0 conda-forge
pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge
parso 0.8.3 pyhd8ed1ab_0 conda-forge
pcre2 10.40 h17e33f8_0 conda-forge
pickleshare 0.7.5 py_1003 conda-forge
pillow 9.4.0 py38h087119c_1 conda-forge
pip 23.3.1 pyhd8ed1ab_0 conda-forge
pkgutil-resolve-name 1.3.10 pyhd8ed1ab_1 conda-forge
platformdirs 3.11.0 pyhd8ed1ab_0 conda-forge
ply 3.11 py_1 conda-forge
pooch 1.8.0 pyhd8ed1ab_0 conda-forge
prometheus_client 0.18.0 pyhd8ed1ab_0 conda-forge
prompt-toolkit 3.0.39 pyha770c72_0 conda-forge
prompt_toolkit 3.0.39 hd8ed1ab_0 conda-forge
psutil 5.9.5 py38h91455d4_1 conda-forge
pthread-stubs 0.4 hcd874cb_1001 conda-forge
pthreads-win32 2.9.1 hfa6e2cd_3 conda-forge
pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge
pycparser 2.21 pyhd8ed1ab_0 conda-forge
pygments 2.16.1 pyhd8ed1ab_0 conda-forge
pyimagej 1.4.1 py38haa244fe_0 conda-forge
pyopenssl 23.3.0 pyhd8ed1ab_0 conda-forge
pyparsing 3.1.1 pyhd8ed1ab_0 conda-forge
pyqt 5.15.9 py38hd6c051e_5 conda-forge
pyqt5-sip 12.12.2 py38hd3f51b4_5 conda-forge
pyrsistent 0.20.0 py38h91455d4_0 conda-forge
pysocks 1.7.1 pyh0701188_6 conda-forge
python 3.8.18 h4de0772_0_cpython conda-forge
python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
python-fastjsonschema 2.18.1 pyhd8ed1ab_0 conda-forge
python-json-logger 2.0.7 pyhd8ed1ab_0 conda-forge
python_abi 3.8 4_cp38 conda-forge
pytz 2023.3.post1 pyhd8ed1ab_0 conda-forge
pywin32 306 py38hd3f51b4_2 conda-forge
pywinpty 2.0.12 py38hd3f51b4_0 conda-forge
pyyaml 6.0.1 py38h91455d4_1 conda-forge
pyzmq 25.1.1 py38hdecc13b_2 conda-forge
qt-main 5.15.8 h720456b_6 conda-forge
qtconsole 5.4.4 pyhd8ed1ab_0 conda-forge
qtconsole-base 5.4.4 pyha770c72_0 conda-forge
qtpy 2.4.1 pyhd8ed1ab_0 conda-forge
referencing 0.30.2 pyhd8ed1ab_0 conda-forge
requests 2.31.0 pyhd8ed1ab_0 conda-forge
rfc3339-validator 0.1.4 pyhd8ed1ab_0 conda-forge
rfc3986-validator 0.1.1 pyh9f0ad1d_0 conda-forge
rpds-py 0.10.6 py38h4900a04_0 conda-forge
scipy 1.10.1 py38h1aea9ed_3 conda-forge
scyjava 1.9.1 pyhd8ed1ab_0 conda-forge
send2trash 1.8.2 pyh08f2357_0 conda-forge
setuptools 68.2.2 pyhd8ed1ab_0 conda-forge
sip 6.7.12 py38hd3f51b4_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
snappy 1.1.10 hfb803bf_0 conda-forge
sniffio 1.3.0 pyhd8ed1ab_0 conda-forge
soupsieve 2.5 pyhd8ed1ab_1 conda-forge
sqlite 3.43.2 hcfcfb64_0 conda-forge
stack_data 0.6.2 pyhd8ed1ab_0 conda-forge
symlink-exe-runtime 1.0 hcfcfb64_0 conda-forge
tbb 2021.10.0 h91493d7_2 conda-forge
terminado 0.17.0 pyh08f2357_0 conda-forge
tifffile 2023.7.10 pyhd8ed1ab_0 conda-forge
tinycss2 1.2.1 pyhd8ed1ab_0 conda-forge
tk 8.6.13 hcfcfb64_0 conda-forge
toml 0.10.2 pyhd8ed1ab_0 conda-forge
tomli 2.0.1 pyhd8ed1ab_0 conda-forge
tornado 6.3.3 py38h91455d4_1 conda-forge
traitlets 5.13.0 pyhd8ed1ab_0 conda-forge
types-python-dateutil 2.8.19.14 pyhd8ed1ab_0 conda-forge
typing-extensions 4.8.0 hd8ed1ab_0 conda-forge
typing_extensions 4.8.0 pyha770c72_0 conda-forge
typing_utils 0.1.0 pyhd8ed1ab_0 conda-forge
ucrt 10.0.22621.0 h57928b3_0 conda-forge
unicodedata2 15.1.0 py38h91455d4_0 conda-forge
uri-template 1.3.0 pyhd8ed1ab_0 conda-forge
urllib3 2.0.7 pyhd8ed1ab_0 conda-forge
vc 14.3 h64f974e_17 conda-forge
vc14_runtime 14.36.32532 hdcecf7f_17 conda-forge
vs2015_runtime 14.36.32532 h05e6639_17 conda-forge
wcwidth 0.2.9 pyhd8ed1ab_0 conda-forge
webcolors 1.13 pyhd8ed1ab_0 conda-forge
webencodings 0.5.1 pyhd8ed1ab_2 conda-forge
websocket-client 1.6.4 pyhd8ed1ab_0 conda-forge
wheel 0.41.3 pyhd8ed1ab_0 conda-forge
widgetsnbextension 4.0.9 pyhd8ed1ab_0 conda-forge
win_inet_pton 1.1.0 pyhd8ed1ab_6 conda-forge
winpty 0.4.3 4 conda-forge
xarray 2023.1.0 pyhd8ed1ab_0 conda-forge
xorg-libxau 1.0.11 hcd874cb_0 conda-forge
xorg-libxdmcp 1.1.3 hcd874cb_0 conda-forge
xz 5.2.6 h8d14728_0 conda-forge
y-py 0.6.2 py38h4900a04_0 conda-forge
yaml 0.2.5 h8ffe710_2 conda-forge
ypy-websocket 0.8.4 pyhd8ed1ab_0 conda-forge
zeromq 4.3.5 h63175ca_0 conda-forge
zfp 1.0.0 h63175ca_4 conda-forge
zipp 3.17.0 pyhd8ed1ab_0 conda-forge
zlib 1.2.13 hcfcfb64_5 conda-forge
zlib-ng 2.0.7 hcfcfb64_0 conda-forge
zstd 1.5.5 h12be248_0 conda-forge

Please let me know what I am doing wrong.

Best,
Jessica

@NicoKiaru
Copy link

Is it still failing today? Maybe you tried unluckily during a maven.scijava.org server downtime?

@JeBiUKD
Copy link
Author

JeBiUKD commented Nov 7, 2023

No unfortunately it still does not work.

@ctrueden
Copy link
Member

ctrueden commented Nov 7, 2023

@JeBiUKD I think the JAVA_HOME needs to be set further up the directory chain. Try:

os.environ["JAVA_HOME"] ="C:/ProgramData/Miniconda3/envs/kymo/Library"

and

os.environ["JAVA_HOME"] ="C:/ProgramData/Miniconda3/envs/kymo/Library/jre"

If neither of those works, try also with backslashes \ instead of forward slashes /?

@hinerm Do you have experience with setting the JAVA_HOME variable on Windows from Python? Does it work? How should it be?

@JeBiUKD
Copy link
Author

JeBiUKD commented Nov 8, 2023

Thank you for the suggestions. I have tried this already and I think the JAVA_HOME set up actually worked.

I have the feeling that the download from maven seems to fail. I checked the folder structure between the two computer and noticed that my .jgo folder looks different. I transferred all the files from the computer where imagJ init did not cause a problem and now it seems to work. :)

@NicoKiaru
Copy link

I have the feeling that the download from maven seems to fail. I checked the folder structure between the two computer and noticed that my .jgo folder looks different. I transferred all the files from the computer where imagJ init did not cause a problem and now it seems to work. :)

Do you have an idea of what was the difference ?

@JeBiUKD
Copy link
Author

JeBiUKD commented Nov 8, 2023

I am not sure how the .jgo folders looked before initializing ImageJ the first time on the other computer, but for the folders on my PC which had trouble initializing imagej in python was missing almost all .jar files. I transferred the missing .jar files and then it worked. Now when running the initialization I get the note that JVM is already running (similar to the other computer).

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