Closed hjmjohnson closed 5 years ago
@thewtex Hi matt. I was hoping to use some of this content to teach students how to ITK python in my class. Unfortunately, I can not get the image viewer (a critical part of teaching) to work in our conda environment. I'm going to use the simple ITK examples for the next 2 weeks, and then try to go back to ITK python if I can get the viewers working.
I've tried recompiling, but that does not work either. Every time I try to view an image, I get a kernel restart.
Thanks for the note, Hans.
I will take a look at the conda environment.
FYI: I have jupyter lab working. I needed to add a few items to the envirionment requirements. I'll pass that along quickly here:
python3 -m venv ~/miattpython3
alias miattpython="source ~/miattpython3/bin/activate"
miattpython
pip install pip --upgrade
pip install setuptools --upgrade
python -m pip install wheel tornado==5.1.1 jupyter jupyterlab matplotlib numpy scipy ipywidgets scikit-learn cookiecutter
python -m pip install --upgrade --pre itk itk-texturefeatures
python -m pip install itkwidgets
jupyter labextension install @jupyter-widgets/jupyterlab-manager itk-jupyter-widgets
@hjmjohnson thanks for the update.
Yes, jupyter lab
requires that extra labextension
step. This requires a Node.js installation, which is easier to make available across platforms with conda. I will work on the conda packages...
I tried the conda installation instructions on both Linux and macOS, and they both worked for me.
Jupyter Lab instructions are added in #32
@hjmjohnson please re-open if issues persist.
The
conda
instructions withjupyter notebook
produce an environment that does not showview(image)
. (i.e. only a string shows up, but no display of an image).The
conda
instructions withjupyter lab
causes the kernel to restart everytime the view(img) function is called.You may want to remove those instructions because they lead to much frustration. The only option that allowed local running of the environments was a system
python3
venv with jupyter notebooks.