Solved by ptrblck in post #4 
              
              
                Thanks for the update! 

Since it’s working fine in Xshell, what’s the setup causing the slow execution/hang and how do these setups differ? It sounds as if your environments might be different (e.g. re you using conda/pip envs?) and one of them might be broken.