How do I use scikit-survival in the online Jupyter Notebook?

Jupyter allows using a lot of command line abilities right inside the running .ipynb file. I suspect you are using one of the most convenient features of this right now and installing from inside the notebook?

The magic install commands, added in 2019, allow for running inside the notebook to do installations, see here for more about them. They magic variations of the install commands insure the installations occur in the environment where the kernel is running.
Because automagics are usually on by default in most Jupyter offerings, it may have worked because it used the magic variation behind-the-scenes even if you added no symbol. The use of the magic %pip install would be more explicit. Spelled out that is:

%pip install scikit-survival

Run that inside a notebook cell and then restarti the kernel before trying the import statement.

1 Like