jmol doesn't start in 10.5

50 views
Skip to first unread message

Richard Quint

unread,
Dec 12, 2024, 1:24:35β€―PM12/12/24
to sage-devel
I have built Sage from source (sage-10.4.tar.gz and sage-10.5.tar.gz) on
four machines with different architectures and different derivatives of
Debian.Β  On all machines the jmol viewer for 3d plots works under 10.4
but not under 10.5.Β  The RuntimeError Traceback is identical on all
machines.Β  A copy of a Sage session is below. Except for the machine
specific info the Traceback is identical for each installation. As you
can see from the transcript, java is installed.Β  It is used by jmol in
10.4.Β  I don't know enough Python to see what the problem is.Β  Any help
would be appreciated.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ SageMath version 10.5, Release Date: 2024-12-04Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  β”‚
β”‚ Using Python 3.12.7. Type "help()" for help.Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
sage: !uname -a
Linux Iphegenia 6.11.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct
14 13:19:59 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
sage: !lsb_release -d
Description:Β Β Β  Ubuntu 24.10
sage: !java --version
openjdk 21.0.5 2024-10-15
OpenJDK Runtime Environment (build 21.0.5+11-Ubuntu-1ubuntu124.10)
OpenJDK 64-Bit Server VM (build 21.0.5+11-Ubuntu-1ubuntu124.10, mixed
mode, sharing)
sage: var('x y')
(x, y)
sage: plot3d(x*y, (-1,1), (-1,1), viewer="jmol")
---------------------------------------------------------------------------
RuntimeErrorΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  Traceback (most recent call last)
Cell In[5], line 1
----> 1 plot3d(x*y, (-Integer(1),Integer(1)), (-Integer(1),Integer(1)),
viewer="jmol")

File
~/Sage/sage-10.5/local/var/lib/sage/venv-python3.12/lib/python3.12/site-packages/IPython/core/displayhook.py:268,
in DisplayHook.__call__(self, result)
Β Β Β  266 self.start_displayhook()
Β Β Β  267 self.write_output_prompt()
--> 268 format_dict, md_dict = self.compute_format_data(result)
Β Β Β  269 self.update_user_ns(result)
Β Β Β  270 self.fill_exec_result(result)

File
~/Sage/sage-10.5/local/var/lib/sage/venv-python3.12/lib/python3.12/site-packages/IPython/core/displayhook.py:157,
in DisplayHook.compute_format_data(self, result)
Β Β Β  127 def compute_format_data(self, result):
Β Β Β  128Β Β Β Β  """Compute format data of the object to be displayed.
Β Β Β  129
Β Β Β  130Β Β Β Β  The format data is a generalization of the :func:`repr` of
an object.
Β Β  (...)
Β Β Β  155
Β Β Β  156Β Β Β Β  """
--> 157Β Β Β Β  return self.shell.display_formatter.format(result)

File ~/Sage/sage-10.5/src/sage/repl/display/formatter.py:187, in
SageDisplayFormatter.format(self, obj, include, exclude)
Β Β Β  112 def format(self, obj, include=None, exclude=None):
Β Β Β  113Β Β Β Β  r"""
Β Β Β  114Β Β Β Β  Use the Sage rich output instead of IPython.
Β Β Β  115
Β Β  (...)
Β Β Β  185Β Β Β Β Β Β Β Β  I am repper
Β Β Β  186Β Β Β Β  """
--> 187Β Β Β Β  sage_format, sage_metadata = self.dm.displayhook(obj)
Β Β Β  188Β Β Β Β  assert PLAIN_TEXT in sage_format, 'plain text is always
present'
Β Β Β  190Β Β Β Β  # use Sage rich output for any except those native to
IPython, but only
Β Β Β  191Β Β Β Β  # if it is not plain and dull

File ~/Sage/sage-10.5/src/sage/repl/rich_output/display_manager.py:800,
in DisplayManager.displayhook(self, obj)
Β Β Β  798 self._backend.set_underscore_variable(obj)
Β Β Β  799 plain_text, rich_output = self._rich_output_formatter(obj, dict())
--> 800 return self._backend.displayhook(plain_text, rich_output)

File ~/Sage/sage-10.5/src/sage/repl/rich_output/backend_ipython.py:266,
in BackendIPythonCommandline.displayhook(self, plain_text, rich_output)
Β Β Β  264Β Β Β Β  return ({'text/plain': msg}, {})
Β Β Β  265 elif isinstance(rich_output, OutputSceneJmol):
--> 266Β Β Β Β  msg = self.launch_jmol(rich_output, plain_text.text.get_str())
Β Β Β  267Β Β Β Β  return ({'text/plain': msg}, {})
Β Β Β  268 elif isinstance(rich_output, OutputSceneWavefront):

File ~/Sage/sage-10.5/src/sage/repl/rich_output/backend_ipython.py:367,
in BackendIPythonCommandline.launch_jmol(self, output_jmol, plain_text)
Β Β Β  365 jdata = JmolData()
Β Β Β  366 if not jdata.is_jmol_available() and not DOCTEST_MODE:
--> 367Β Β Β Β  raise RuntimeError('jmol cannot run, no suitable java
version found')
Β Β Β  368 launch_script = output_jmol.launch_script_filename()
Β Β Β  369 jmol_cmd = 'jmol'

RuntimeError: jmol cannot run, no suitable java version found
sage:


Dima Pasechnik

unread,
Dec 12, 2024, 3:40:03β€―PM12/12/24
to sage-...@googlegroups.com
This most probably just means that jmol package is not installed. It's
now optional, you need to explicitly say you want it installed.
The quickest way would by just

make jmol

from the directory you built Sage from.
Then try running your test again
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/sage-devel/87e704ba-846b-4f2a-abf2-a7a81e3cff5b%40gmail.com.

Richard Quint

unread,
Dec 12, 2024, 4:12:16β€―PM12/12/24
to sage-devel
That was it.Β  I missed that jmol was optional now.Β  Thanks
Reply all
Reply to author
Forward
0 new messages