clij / clijpy

GPU-accelerated image processing using CLIJ via pyimagej in python
https://clij.github.io/clijpy
BSD 3-Clause "New" or "Revised" License
10 stars 1 forks source link

windows installation #4

Open guiwitz opened 4 years ago

guiwitz commented 4 years ago

Hi @haesleinhuepf,

I have some trouble installing clijpy on a Windows machine by using a simple conda installation. Re-reading your installation instructions for Windows:

set PATH=%PATH%;C:\Program Files\Java\jdk1.8.0_161\jre\bin\server
copy "C:\Program Files\Java\jdk1.8.0_161\include\win32\jni_md.h" c:\ProgramData\Anaconda3\Library\include
python -m pip install --upgrade pip setuptools
python -m pip install --upgrade cython
pip install pyjnius
pip install pyimagej

set "JDK_HOME=C:\Program Files\Java\jdk1.8.0_161\"

pip install jnius

# get the environment.yml file from: https://raw.githubusercontent.com/imagej/pyimagej/master/environment.yml
conda env create -f environment.yml

conda activate imagej

pip install pyimagej
pip install scikit-image
pip install scipy
pip install numpy
pip install matplotlib

I'm just a bit troubled my one thing: at the very beginning you pip install pyjnius and pyimagej in the base environment, then create an environment called imagej and install again pyimagej in there. Is there a reason for this ? My installation has trouble finding the JDK. Does this "double-installation" fix this ? I'm just a bit worried about installing things into the base environment.

Thanks for your help! Cheers, Guillaume

haesleinhuepf commented 4 years ago

Hi @guiwitz ,

sorry for the confusion. I was also confused because there exist two ways for installing pyimagej. You don't need to install anything in the base. I just tried again and found this working:

conda config --add channels conda-forge
conda config --set channel_priority strict

conda create -n pyimagej pyimagej openjdk=8
Whenever you want to use pyimagej, activate its environment:

conda activate pyimagej
pip install pyimagej
pip install scikit-image
pip install scipy
pip install numpy
pip install matplotlib
pip install gputools

I also updated the installation instructions on the readme accordingly. Would you mind trying installation like this?

Thanks!

Cheers, Robert

guiwitz commented 4 years ago

Hi @haesleinhuepf,

so now when exactly following these instructions, everything works and things are blazingly fast on my Quadro p4000 ! However

pip install pyimagej

is not necessary as it gets installed by conda when creating the environment. I tried without and it worked. I also had the pyopencl problem mentioned in the instructions. I downloaded pyopencl and then could run:

pip install pyopencl-2019.1.1+cl12-cp37-cp37m-win_amd64.whl
pip install gputools

Maybe it's worth mentioning that the whl file has to be installed with pip in the instructions ?

Probably now you should also change the Linux instructions so that people don't think they have to install pyimagej in the base environment ?

Cheers,

Guillaume

haesleinhuepf commented 4 years ago

Hey @guiwitz ,

thanks again for checking the instructions. I just updated/simplified them. IMHO windows and linux instructions are the same now, except the issue with pyopencl.

Again, your support is very much appreciated!

Cheers, Robert