diff --git a/model_zoo/TCIA_PROSTATEx_Prostate_MRI_Anatomy_Model.ipynb b/model_zoo/TCIA_PROSTATEx_Prostate_MRI_Anatomy_Model.ipynb index a5cff65e0..263ded214 100644 --- a/model_zoo/TCIA_PROSTATEx_Prostate_MRI_Anatomy_Model.ipynb +++ b/model_zoo/TCIA_PROSTATEx_Prostate_MRI_Anatomy_Model.ipynb @@ -108,29 +108,28 @@ "# such as voxel image, image orientation, and image directions,\n", "# which are critical to image processing and display.\n", "\n", + "import sys\n", + "\n", "# Upgrade pip, just in case.\n", - "!python -m pip install --upgrade -q pip\n", + "!{sys.executable} -m pip install --upgrade -q pip\n", "\n", "# installations required for monai\n", - "!python -c \"import monai\" || pip install -q \"monai[nibabel,itk,tqdm,pandas,skimage]\"\n", - "!python -c \"import cv2\" || pip install -q opencv-python-headless\n", + "!{sys.executable} -m pip install -q \"monai[nibabel,itk,tqdm,pandas,skimage]\"\n", + "!{sys.executable} -m pip install -q opencv-python-headless\n", "\n", "# These are the libraries used to read DICOM Seg objects.\n", - "!python -m pip install -q \"pydicom<3\" pydicom-seg\n", + "!{sys.executable} -m pip install -q \"pydicom==2.4.4\" pydicom-seg\n", "\n", "# Install the dependency manually to avoid installing opencv-python.\n", - "!python -m pip install -q plotly bs4 unidecode\n", - "!python -m pip install -q --no-deps rt-utils\n", + "!{sys.executable} -m pip install -q plotly bs4 unidecode\n", + "!{sys.executable} -m pip install -q --no-deps rt-utils\n", "\n", "# Install tcia_utils to download the datasets.\n", - "!python -m pip install --upgrade -q --no-deps tcia_utils\n", + "!{sys.executable} -m pip install --upgrade -q --no-deps tcia_utils\n", "\n", "# This is the installation required for itkWidgets.\n", - "!python -m pip install --upgrade --pre -q \"itkwidgets[all]\" imjoy_elfinder\n", - "\n", - "# TEMPORARY WORKAROUND TO RESOLVE: https://github.com/kirbyju/TCIA_Notebooks/issues/30\n", - "!python -m pip uninstall -y -q zarr ngff_zarr\n", - "!python -m pip install -q zarr ngff_zarr" + "!{sys.executable} -m pip install --upgrade -q \"itkwidgets[all]==1.0a53\" imjoy_elfinder\n", + "\n" ] }, { @@ -450,7 +449,9 @@ }, { "data": { - "application/javascript": "window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")", + "application/javascript": [ + "window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")" + ], "text/plain": [ "" ] @@ -586,7 +587,9 @@ }, { "data": { - "application/javascript": "window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")", + "application/javascript": [ + "window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")" + ], "text/plain": [ "" ] @@ -659,7 +662,9 @@ }, { "data": { - "application/javascript": "window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")", + "application/javascript": [ + "window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")" + ], "text/plain": [ "" ] @@ -753,9 +758,9 @@ "provenance": [] }, "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "monai", "language": "python", - "name": "python3" + "name": "monai" }, "language_info": { "codemirror_mode": { @@ -771,5 +776,5 @@ } }, "nbformat": 4, - "nbformat_minor": 1 + "nbformat_minor": 4 }