Error starting pyspark kernel (permission denied)

Hi,

I’m having trouble running the pyspark kernel in my TLJH environment. The error I receive is as follows…
Traceback (most recent call last):
File “/opt/tljh/user/lib/python3.9/site-packages/tornado/web.py”, line 1704, in _execute
result = await result
File “/opt/tljh/user/lib/python3.9/asyncio/tasks.py”, line 328, in __wakeup
future.result()
File “/opt/tljh/user/lib/python3.9/site-packages/tornado/gen.py”, line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File “/opt/tljh/user/lib/python3.9/site-packages/notebook/services/sessions/handlers.py”, line 74, in post
model = yield maybe_future(
File “/opt/tljh/user/lib/python3.9/site-packages/tornado/gen.py”, line 762, in run
value = future.result()
File “/opt/tljh/user/lib/python3.9/site-packages/tornado/gen.py”, line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File “/opt/tljh/user/lib/python3.9/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 “/opt/tljh/user/lib/python3.9/site-packages/tornado/gen.py”, line 762, in run
value = future.result()
File “/opt/tljh/user/lib/python3.9/site-packages/tornado/gen.py”, line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File “/opt/tljh/user/lib/python3.9/site-packages/notebook/services/sessions/sessionmanager.py”, line 110, in start_kernel_for_session
kernel_id = yield maybe_future(
File “/opt/tljh/user/lib/python3.9/site-packages/tornado/gen.py”, line 762, in run
value = future.result()
File “/opt/tljh/user/lib/python3.9/asyncio/futures.py”, line 201, in result
raise self._exception
File “/opt/tljh/user/lib/python3.9/asyncio/tasks.py”, line 256, in __step
result = coro.send(None)
File “/opt/tljh/user/lib/python3.9/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 “/opt/tljh/user/lib/python3.9/site-packages/jupyter_client/utils.py”, line 30, in wrapped
raise e
File “/opt/tljh/user/lib/python3.9/site-packages/jupyter_client/utils.py”, line 27, in wrapped
return loop.run_until_complete(future)
File “/opt/tljh/user/lib/python3.9/site-packages/nest_asyncio.py”, line 89, in run_until_complete
return f.result()
File “/opt/tljh/user/lib/python3.9/asyncio/futures.py”, line 201, in result
raise self._exception
File “/opt/tljh/user/lib/python3.9/asyncio/tasks.py”, line 256, in __step
result = coro.send(None)
File “/opt/tljh/user/lib/python3.9/site-packages/jupyter_client/multikernelmanager.py”, line 212, in _async_start_kernel
starter = ensure_async(km.start_kernel(**kwargs))
File “/opt/tljh/user/lib/python3.9/site-packages/jupyter_client/utils.py”, line 30, in wrapped
raise e
File “/opt/tljh/user/lib/python3.9/site-packages/jupyter_client/utils.py”, line 27, in wrapped
return loop.run_until_complete(future)
File “/opt/tljh/user/lib/python3.9/site-packages/nest_asyncio.py”, line 89, in run_until_complete
return f.result()
File “/opt/tljh/user/lib/python3.9/asyncio/futures.py”, line 201, in result
raise self._exception
File “/opt/tljh/user/lib/python3.9/asyncio/tasks.py”, line 256, in __step
result = coro.send(None)
File “/opt/tljh/user/lib/python3.9/site-packages/jupyter_client/manager.py”, line 83, in wrapper
raise e
File “/opt/tljh/user/lib/python3.9/site-packages/jupyter_client/manager.py”, line 75, in wrapper
out = await method(self, *args, **kwargs)
File “/opt/tljh/user/lib/python3.9/site-packages/jupyter_client/manager.py”, line 387, in _async_start_kernel
await ensure_async(self._launch_kernel(kernel_cmd, **kw))
File “/opt/tljh/user/lib/python3.9/site-packages/jupyter_client/utils.py”, line 30, in wrapped
raise e
File “/opt/tljh/user/lib/python3.9/site-packages/jupyter_client/utils.py”, line 27, in wrapped
return loop.run_until_complete(future)
File “/opt/tljh/user/lib/python3.9/site-packages/nest_asyncio.py”, line 89, in run_until_complete
return f.result()
File “/opt/tljh/user/lib/python3.9/asyncio/futures.py”, line 201, in result
raise self._exception
File “/opt/tljh/user/lib/python3.9/asyncio/tasks.py”, line 256, in __step
result = coro.send(None)
File “/opt/tljh/user/lib/python3.9/site-packages/jupyter_client/manager.py”, line 307, in _async_launch_kernel
connection_info = await self.provisioner.launch_kernel(kernel_cmd, **kw)
File “/opt/tljh/user/lib/python3.9/site-packages/jupyter_client/provisioning/local_provisioner.py”, line 204, in launch_kernel
self.process = launch_kernel(cmd, **scrubbed_kwargs)
File “/opt/tljh/user/lib/python3.9/site-packages/jupyter_client/launcher.py”, line 170, in launch_kernel
raise ex
File “/opt/tljh/user/lib/python3.9/site-packages/jupyter_client/launcher.py”, line 158, in launch_kernel
proc = Popen(cmd, **kwargs)
File “/opt/tljh/user/lib/python3.9/subprocess.py”, line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File “/opt/tljh/user/lib/python3.9/subprocess.py”, line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: ‘/root/anaconda3/bin/python’

Any thoughts on how to resolve? Anaconda is running as root and root has full access to /root/anaconda3/bin/python

Thanks!
Stuart