3-manifolds / Sage_macOS

SageMath as a macOS application bundle.
152 stars 15 forks source link

SageMath 9.6 Prerelease not working #39

Closed GMS103 closed 2 years ago

GMS103 commented 2 years ago

Trying to open a new SageMath 9.6 notebook gives

Traceback (most recent call last):
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/tornado/web.py", line 1704, in _execute
    result = await result
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/asyncio/tasks.py", line 304, in __wakeup
    future.result()
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/tornado/gen.py", line 769, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/notebook/services/sessions/handlers.py", line 74, in post
    model = yield maybe_future(
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/tornado/gen.py", line 762, in run
    value = future.result()
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/tornado/gen.py", line 769, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/notebook/services/sessions/sessionmanager.py", line 98, in create_session
    kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/tornado/gen.py", line 762, in run
    value = future.result()
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/tornado/gen.py", line 769, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/notebook/services/sessions/sessionmanager.py", line 110, in start_kernel_for_session
    kernel_id = yield maybe_future(
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/tornado/gen.py", line 762, in run
    value = future.result()
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/asyncio/futures.py", line 201, in result
    raise self._exception
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/asyncio/tasks.py", line 232, in __step
    result = coro.send(None)
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/notebook/services/kernels/kernelmanager.py", line 176, in start_kernel
    kernel_id = await maybe_future(self.pinned_superclass.start_kernel(self, **kwargs))
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/jupyter_client/utils.py", line 26, in wrapped
    raise e
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/jupyter_client/utils.py", line 23, in wrapped
    return loop.run_until_complete(future)
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/nest_asyncio.py", line 81, in run_until_complete
    return f.result()
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/asyncio/futures.py", line 201, in result
    raise self._exception
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/asyncio/tasks.py", line 232, in __step
    result = coro.send(None)
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/jupyter_client/multikernelmanager.py", line 187, in _async_start_kernel
    starter = ensure_async(km.start_kernel(**kwargs))
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/jupyter_client/utils.py", line 26, in wrapped
    raise e
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/jupyter_client/utils.py", line 23, in wrapped
    return loop.run_until_complete(future)
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/nest_asyncio.py", line 81, in run_until_complete
    return f.result()
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/asyncio/futures.py", line 201, in result
    raise self._exception
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/asyncio/tasks.py", line 232, in __step
    result = coro.send(None)
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/jupyter_client/manager.py", line 362, in _async_start_kernel
    raise e
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/jupyter_client/manager.py", line 351, in _async_start_kernel
    await ensure_async(self._launch_kernel(kernel_cmd, **kw))
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/jupyter_client/utils.py", line 26, in wrapped
    raise e
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/jupyter_client/utils.py", line 23, in wrapped
    return loop.run_until_complete(future)
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/nest_asyncio.py", line 81, in run_until_complete
    return f.result()
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/asyncio/futures.py", line 201, in result
    raise self._exception
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/asyncio/tasks.py", line 232, in __step
    result = coro.send(None)
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/jupyter_client/manager.py", line 269, in _async_launch_kernel
    connection_info = await self.provisioner.launch_kernel(kernel_cmd, **kw)
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/jupyter_client/provisioning/local_provisioner.py", line 179, in launch_kernel
    self.process = launch_kernel(cmd, **scrubbed_kwargs)
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/jupyter_client/launcher.py", line 169, in launch_kernel
    raise ex
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/site-packages/jupyter_client/launcher.py", line 157, in launch_kernel
    proc = Popen(cmd, **kwargs)
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/subprocess.py", line 966, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/private/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.10.3/lib/python3.10/subprocess.py", line 1842, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/var/tmp/sage-9.6-current/local/var/lib/sage/venv-python3.9.9/bin/sage'

And in fact ls /var/tmp/sage-9.6-current/local/var/lib/sage gives

installed
runpath.sh
scripts
venv-python3.10.3

This is on Apple M1, macOS 11.6.5.

culler commented 2 years ago

Thank you very much for helping to test this prerelease! Of course we should not expect to find a venv for python 3.9 when we are using python 3.10. I will track down which component of jupyter has not been updated from 3.9 to 3.10. When I find it I will replace the disk image.

culler commented 2 years ago

The problem was that a jupyter kernel.json file used an absolute path to the venv from the 9.5 app instead of using the venv symlink. I have now uploaded new disk images with that file replaced. I am able to open jupyter notebooks on both arm64 and x86_64. Please check if this now works for you.

Thanks again.

GMS103 commented 2 years ago

Now I can open notebooks, new and old. Thanks.