Skip to content

Commit

Permalink
Fix opencv-python issue in TCIA tutorial (Project-MONAI#1693)
Browse files Browse the repository at this point in the history
Fixes Project-MONAI#1692
workaround for Project-MONAI#1694 

### Description

- Install dependency required by tcia_utils manually to avoid installing
opencv-python
- comment view command in the notebook

### Checks
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [ ] Avoid including large-size files in the PR.
- [ ] Clean up long text outputs from code cells in the notebook.
- [ ] For security purposes, please check the contents and remove any
sensitive info such as user names and private key.
- [ ] Ensure (1) hyperlinks and markdown anchors are working (2) use
relative paths for tutorial repo files (3) put figure and graphs in the
`./figure` folder
- [ ] Notebook runs automatically `./runner.sh -t <path to .ipynb file>`

---------

Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
  • Loading branch information
KumoLiu authored Apr 22, 2024
1 parent e18d615 commit b46eccc
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions model_zoo/TCIA_PROSTATEx_Prostate_MRI_Anatomy_Model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,14 @@
"!python -m pip install -q pydicom pydicom-seg\n",
"\n",
"# Install tcia_utils to download the datasets.\n",
"!python -m pip install --upgrade -q tcia_utils\n",
"!python -m pip install --upgrade -q --no-deps tcia_utils\n",
"\n",
"# Install the dependency manually to avoid installing opencv-python.\n",
"!python -m pip install -q plotly bs4 ipywidgets unidecode jsonschema\n",
"!python -m pip install -q --no-deps rt-utils\n",
"\n",
"# This is the installation required for itkWidgets.\n",
"!python -m pip install --upgrade --pre -q \"itkwidgets[all]==1.0a20\" imjoy_elfinder"
"!python -m pip install --upgrade --pre -q \"itkwidgets[all]==1.0a23\" imjoy_elfinder"
]
},
{
Expand Down Expand Up @@ -412,7 +416,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": null,
"metadata": {
"id": "RF4LqDs-emJR",
"tags": []
Expand Down Expand Up @@ -441,9 +445,7 @@
},
{
"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": [
"<IPython.core.display.Javascript object>"
]
Expand Down Expand Up @@ -579,9 +581,7 @@
},
{
"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": [
"<IPython.core.display.Javascript object>"
]
Expand Down Expand Up @@ -654,9 +654,7 @@
},
{
"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": [
"<IPython.core.display.Javascript object>"
]
Expand Down Expand Up @@ -764,7 +762,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down

0 comments on commit b46eccc

Please sign in to comment.