4

So I recently had this question where, among other problems, a completely commented out file was still running and working on JupyerHub, but not on the terminal. I figured out this is due to the fact that I was modifying the library files locally, and JupyterHub does not always re-sync the site-packages/libraries.

However, is there a way to make JupyterHub do this as the user? Basically, I want the following to happen:

1. pip install LibraryA
2. modify file within LibraryA, doSomethingLibA.py
3. run script on JupyterHub using updated version of LibraryA 

I have tried re-starting the kernel, but that didn't seem to solve it. Is there a way to do this?

ocean800
  • 3,489
  • 13
  • 41
  • 73
  • 1
    You can try `del sys.modules[your_module.__name__]; import your_module`, but be careful as some objects can still hold a reference to objects from the old module. – kmaork Nov 12 '19 at 18:29

0 Answers0