For me, the issue was caused by activating multiple conda environments. And deactivating the first one will switch the ipython to the second environment version which solved the issue.