pyimagej
pyimagej copied to clipboard
Setting up PyImageJ without internet access
Hello, I'm trying to set up PyImageJ to run on a server without internet access. I installed with conda and followed the instructions here But when I test my installation I get the following error
`Failed to bootstrap the artifact.
Possible solutions:
- Double check the endpoint for correctness (https://search.maven.org/).
- Add needed repositories to ~/.jgorc [repositories] block (see README).
- Try with an explicit version number (release metadata might be wrong).
Full Maven error output:
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: The following artifacts could not be resolved: net.imagej:imagej:pom:2.3.0 (absent): Could not transfer artifact net.imagej:imagej:pom:2.3.0 from/to scijava.public (https://maven.scijava.org/content/groups/public): Connect to maven.scijava.org:443 [maven.scijava.org/144.92.48.199] failed: connect timed out @ line 8, column 29
[ERROR] 'dependencies.dependency.version' for net.imagej:imagej-legacy:jar is missing. @ line 10, column 252
[ERROR] 'dependencies.dependency.version' for org.scijava:scijava-config:jar is missing. @ line 10, column 462
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project net.imagej-BOOTSTRAPPER:imagej-BOOTSTRAPPER:0 (/home/kschmidt/.jgo/net.imagej/imagej/2.3.0/96c7e6a6707857e3645e206740265f7cd7cb8259fa4e6088027a50d0c8d21865/pom.xml) has 3 errors
[ERROR] Non-resolvable import POM: The following artifacts could not be resolved: net.imagej:imagej:pom:2.3.0 (absent): Could not transfer artifact net.imagej:imagej:pom:2.3.0 from/to scijava.public (https://maven.scijava.org/content/groups/public): Connect to maven.scijava.org:443 [maven.scijava.org/144.92.48.199] failed: connect timed out @ line 8, column 29 -> [Help 2]
[ERROR] 'dependencies.dependency.version' for net.imagej:imagej-legacy:jar is missing. @ line 10, column 252
[ERROR] 'dependencies.dependency.version' for org.scijava:scijava-config:jar is missing. @ line 10, column 462
[ERROR]
[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]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
Invalid Initialization: you may be using a primary endpoint that lacks pom-scijava as a parent
To keep all Java components at compatible versions we recommend using a primary endpoint with a pom-scijava parent.
For example, by putting 'net.imagej:imagej' first in your list of endpoints.
If you are sure you DO NOT want a primary endpoint with a pom-scijava parent, please re-initialize with 'add_legacy=False'.
Traceback (most recent call last):
File "
I ran the PyImageJ doctor and get the response Great job! All looks good.
What else do I need to do to get PyImageJ running without exposing my server to internet?
@KSchmidtACR did you try the suggestions on the Troubleshooting page?
In particular, I assume that initializing with a local copy of Fiji (including imglib2-unsafe
and imglib2-imglyb
) could help, as described in point (4) below Could not transfer artifact:
https://github.com/imagej/pyimagej/blob/1.4.1/doc/Troubleshooting.md#could-not-transfer-artifact
Yes I followed those suggestions. The error posted above is occurring while trying to initialize with a local copy of Fiji after downloading imglib2-unsafe and imglib2-imglyb and placing them in my local Fiji.app/jars directory.
Hi @KSchmidtACR, is this still an issue for you? I re-read your issue and I'm wondering if you are initializing PyImageJ "wrong". What I mean by that is the test code that we suggest users run attempts to download the needed Jars from maven via the internet:
python -c 'import imagej; ij = imagej.init("2.3.0"); print(ij.getVersion()); ij.dispose()'
To initialize a local installation you'd have to modify this to use the path to your Fiji.app folder. So something like this:
python -c 'import imagej; ij = imagej.init("/path/to/Fiji.app"); print(ij.getVersion()); ij.dispose()'