My institute has a goal of making data more accessible for the customers. The idea is that we should use Jupyter notebooks to present browsable data and provide interactive plots of relevant measurements. I agree that this is a good idea, but I have close to zero experience with notebooks or Python. I see this as an opportunity to learn something useful.
I found the tutorials for using ImageJ in notebooks at GitHub - imagej/tutorials: ImageJ programming examples to be a promising start, but am struggling to get them to work.
My problem is simply getting the necessary frameworks installed. Since our institute is based on contract research, we come under Anaconda’s definition of commercial use, and are since 2020 therefore required to license it. My company’s interpretation of the terms and response to that is simply “do not use Anaconda anymore” and “anything you can do with Anaconda you can also do without it”. The problem is how to do the latter when you are a newbie. Almost all instructions I find when looking at the install instructions for the many dependencies just start with “1) install Anaconda” and there are no details provided for how to do stuff without it.
I have got this far until I got stuck:
I have installed Python and Jupyter and and necessary python modules such as pyimagej using pip.
I am able to get pure Python-based example code running properly, such as the initial examples in the Python-based notebook at tutorials/6-ImageJ-with-Python-Kernel.ipynb at d3ff8e818bb26cb4713371878b239b36cb7d4877 · imagej/tutorials · GitHub
The problem starts as soon as I try to run anything that depends on java. The example notebook works until [24], which uses jnius
. pip install jnius
does not work at all, but a websearch suggested I do pip install pyjnius
instead and that installed without errors. I have set the required environment variables pointing to the Java 8 JDK folder (inside Fiji). The pyjnius
hello-world example works from the command line. But jnius
does not work in the Jupyter notebook; I get an error message that the JVM could not be started. Are the environment variables perhaps not passed properly from the OS to the notebook? How can I check that?
The other problem I have is getting the Groovy kernel available to Jupyter. I installed BeakerX using pip but Jupyter still shows no other kernel than Python 3 available, so all the other notebooks in the tutorial do not work at all, as expected.
Does anyone know about possible solutions here, that do not require Anaconda?
I am using Windows 10/64 but I don’t think that is the primary problem here.
Stein