SpandanMadan:

PermissionError: [Errno 13] Permission denied: ‘/afs/csail.mit.edu/u/s/smadan/miniconda3/envs/py_36_tens_gpu/lib/python3.6/site-packages/PIL/BmpImagePlugin.py’


The path here looks like you are using python from remote server/drive.  How do you login to the server or how does it work? It depends on how your user drive access work in your institute I guess.
My wild guess is that when you login to a machine,  your particular logical drive is plugged in automatically for you. When you log out,  the logical drive is automatically removed as well.