Update the Python version of TLJH

I have a TLJH server deployed in one of the servers of my company and I need to make some code to work on it (I cannot really change the code, although I could start a conversation about changing it).
The code works in local with Python 3.10 but the Python version inside the The Littlest JupyterHub is 3.9, and since the code use some modern features, such as the notation in the image, I need to update this last Python version.

image

I checked the docs and found this but I end up with this error:

cannot access '/home/user/.conda/pkgs/urls.txt': No such file or directory

How can I generate the urls.txt so I can run the commands from the aforementioned guide?

Thanks in advance.

Hello, I manage to solve it.

In order to solve my problem I needed to add a new kernel to TLJH with a newer Python version such as 3.10 so this new features worked properly.
I had to install Python 3.10 from the source (since I was using Ubuntu 18.04.6 LTS) and then it was a matter of creating a new conda environment, add Python 3.10 to it, create a new kernel inside of it and later restart the service. I also added nb_conda_kernels to make sure the server could find the new kernels.

This is all the snippets I had to run

#Step 1: Install Python 3.10 in Ubuntu 18.04.6 LTS
sudo apt update
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev

#Choose our version, we went for 3.10.12
VERSION=3.10.12
wget https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tgz

tar -xf Python-$VERSION.tgz
cd  Python-$VERSION/
./configure --enable-optimizations

#Compile the code
make -j $(nproc)
#Effectively install Python 3.10
sudo make altinstall

#Create the environment
conda create --name myenv python=3.10
conda activate myenv
conda install python=3.10
pip install ipykernel
#Register the kernel
python -m ipykernel install --user --name=my-python3-kernel
#Add the library to refresh the list of kernels regularly to the "base" environment
conda install -n base nb_conda_kernels
#Restart TLJH
sudo tljh-config reload hub