Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Restart the Python Environment is a reload is required
# how to make sure to restart the jupyter notebook
try:
%pip install --user --quiet --upgrade my_module
import my_module
except ModuleNotFoundError:
import os
os.kill(os.getpid(), 9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment