|
108 | 108 | "# such as voxel image, image orientation, and image directions,\n",
|
109 | 109 | "# which are critical to image processing and display.\n",
|
110 | 110 | "\n",
|
| 111 | + "import sys\n", |
| 112 | + "\n", |
111 | 113 | "# Upgrade pip, just in case.\n",
|
112 |
| - "!python -m pip install --upgrade -q pip\n", |
| 114 | + "!{sys.executable} -m pip install --upgrade -q pip\n", |
113 | 115 | "\n",
|
114 | 116 | "# installations required for monai\n",
|
115 |
| - "!python -c \"import monai\" || pip install -q \"monai[nibabel,itk,tqdm,pandas,skimage]\"\n", |
116 |
| - "!python -c \"import cv2\" || pip install -q opencv-python-headless\n", |
| 117 | + "!{sys.executable} -m pip install -q \"monai[nibabel,itk,tqdm,pandas,skimage]\"\n", |
| 118 | + "!{sys.executable} -m pip install -q opencv-python-headless\n", |
117 | 119 | "\n",
|
118 | 120 | "# These are the libraries used to read DICOM Seg objects.\n",
|
119 |
| - "!python -m pip install -q \"pydicom<3\" pydicom-seg\n", |
| 121 | + "!{sys.executable} -m pip install -q \"pydicom==2.4.4\" pydicom-seg\n", |
120 | 122 | "\n",
|
121 | 123 | "# Install the dependency manually to avoid installing opencv-python.\n",
|
122 |
| - "!python -m pip install -q plotly bs4 unidecode\n", |
123 |
| - "!python -m pip install -q --no-deps rt-utils\n", |
| 124 | + "!{sys.executable} -m pip install -q plotly bs4 unidecode\n", |
| 125 | + "!{sys.executable} -m pip install -q --no-deps rt-utils\n", |
124 | 126 | "\n",
|
125 | 127 | "# Install tcia_utils to download the datasets.\n",
|
126 |
| - "!python -m pip install --upgrade -q --no-deps tcia_utils\n", |
| 128 | + "!{sys.executable} -m pip install --upgrade -q --no-deps tcia_utils\n", |
127 | 129 | "\n",
|
128 | 130 | "# This is the installation required for itkWidgets.\n",
|
129 |
| - "!python -m pip install --upgrade --pre -q \"itkwidgets[all]\" imjoy_elfinder\n", |
130 |
| - "\n", |
131 |
| - "# TEMPORARY WORKAROUND TO RESOLVE: https://github.com/kirbyju/TCIA_Notebooks/issues/30\n", |
132 |
| - "!python -m pip uninstall -y -q zarr ngff_zarr\n", |
133 |
| - "!python -m pip install -q zarr ngff_zarr" |
| 131 | + "!{sys.executable} -m pip install --upgrade -q \"itkwidgets[all]==1.0a53\" imjoy_elfinder\n", |
| 132 | + "\n" |
134 | 133 | ]
|
135 | 134 | },
|
136 | 135 | {
|
|
450 | 449 | },
|
451 | 450 | {
|
452 | 451 | "data": {
|
453 |
| - "application/javascript": "window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")", |
| 452 | + "application/javascript": [ |
| 453 | + "window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")" |
| 454 | + ], |
454 | 455 | "text/plain": [
|
455 | 456 | "<IPython.core.display.Javascript object>"
|
456 | 457 | ]
|
|
586 | 587 | },
|
587 | 588 | {
|
588 | 589 | "data": {
|
589 |
| - "application/javascript": "window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")", |
| 590 | + "application/javascript": [ |
| 591 | + "window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")" |
| 592 | + ], |
590 | 593 | "text/plain": [
|
591 | 594 | "<IPython.core.display.Javascript object>"
|
592 | 595 | ]
|
|
659 | 662 | },
|
660 | 663 | {
|
661 | 664 | "data": {
|
662 |
| - "application/javascript": "window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")", |
| 665 | + "application/javascript": [ |
| 666 | + "window.connectPlugin && window.connectPlugin(\"f2c5a353-92e5-49ea-8f0a-4a5232883799\")" |
| 667 | + ], |
663 | 668 | "text/plain": [
|
664 | 669 | "<IPython.core.display.Javascript object>"
|
665 | 670 | ]
|
|
753 | 758 | "provenance": []
|
754 | 759 | },
|
755 | 760 | "kernelspec": {
|
756 |
| - "display_name": "Python 3 (ipykernel)", |
| 761 | + "display_name": "monai", |
757 | 762 | "language": "python",
|
758 |
| - "name": "python3" |
| 763 | + "name": "monai" |
759 | 764 | },
|
760 | 765 | "language_info": {
|
761 | 766 | "codemirror_mode": {
|
|
771 | 776 | }
|
772 | 777 | },
|
773 | 778 | "nbformat": 4,
|
774 |
| - "nbformat_minor": 1 |
| 779 | + "nbformat_minor": 4 |
775 | 780 | }
|
0 commit comments