Avoiding installing jpype1 for the user in the Python platform check notebook now

This commit is contained in:
Joseph Lizier 2025-08-27 11:57:16 +10:00
parent b7df166959
commit a76d3ff291
1 changed files with 7 additions and 3 deletions

View File

@ -96,9 +96,13 @@
" from jpype import *\n",
" print(\"✅ jpype1 is already installed.\")\n",
"except ImportError:\n",
" print(\"❌ jpype1 is not installed, installing now.\")\n",
" !pip install --user jpype1\n",
" print(\"Install attempted: if successful, you should restart the kernel and run the notebook again after this.\")"
" print(\"❌ jpype1 is not installed!\")\n",
" # In principle, we could try to install jpype1 for the user as:\n",
" # !pip install --user jpype1\n",
" # However there are too many complications (e.g. pip-v-pip3, externally managed environments, etc).\n",
" # So we will ask the user to install jpype1 themselves\n",
" print(\"Please use your python package manager (e.g. pip, pip3, homebrew, conda, etc) to install *jpype1* (not jpype).\")\n",
" print(\"Then restart the kernel for this notebook, and run the notebook again.\")"
]
},
{