A Python application that I'm working on currently involves pip installing a project with a setup.py directly from GitHub. A function from within the application runs this pip install and takes an optional parameter that can install a specific branch of the user's choice.
When running said function in a Jupyter notebook that has a different version of the project installed, a kernel restart is required in order to retrieve the latest updates.
I've been exploring solutions and this solution does indeed restart the kernel. However, when I embed this kernel restart after the pip install segment of the function, the Python code execution comes to a halt as the kernel is now refreshed. This halt can't happen since after the pip install the function still performs many operations that require the pip installed project.
So here's my question: is there a way to continue Python code execution after a Jupyter kernel has been restarted in the same body of code?