Open psychemedia opened 1 year ago
Hmmm... Running python
in the container works from the VS Code terminal inside the container locally, but not in the remote Codespace?
Fixing the kernel.json file in https://github.com/ouseful-testing/codespace-tm351-test via a docker-compose rebuild of the container to modify the kernel.json file fixed things?
FROM ouvocl/vce-tm351-jh:22j-b6
USER root
RUN sed -i 's/ "python",/ "python3",/g' /usr/local/share/jupyter/kernels/python3/kernel.json
USER $NB_USER
But try to replace the image with the compose led rebuild in this repo just errored. Simplest thing may be just to make sure the container works by modding it and pushing an update to Dockerhub.
But then again - maybe not... it seems we are finding another Python environment, not the intended one????
I note there is also a python-is-python3
Linux package for Linux 20+ that will use python
as an alias for python3
.
Don't use a kernel - just use the environment.
The JupyterLab environment will connect to the jupyter kernel but VS Code want.
It looks as if it may be trying to start the kernel using
/usr/local/share/jupyter/kernels/python3/kernel.json
:but there is no
python
command, onlypython3
. Thekernel.json
file is owned by root and, of course, we don't haveroot
access inside the container...-rw-r--r-- 1 root root 193 Aug 13 2021 /usr/local/share/jupyter/kernels/python3/kernel.json
However, running the devcontainer locally, using:
docker exec -it --user root CONTAINER_NAME /bin/bash
to enter as root, then using
vi
(ESC-i
to insert;ESC : wq
to save and quit) then restarting the container and reconnecting the VS Code environment doesn't discover the kernel. So how is Jupyter finding it?The
jupyter kernelspec list
command inside the container gives just:/usr/local/share/jupyter/kernels/python3
so that is the right path?
So what is
{connection_file}
??? Ah, just the name to give the file, maybe...