diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index d3389a8..ef83ce8 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -925,7 +925,7 @@ class InteractiveShell(SingletonConfigurable): # In Cygwin paths like "c:\..." and '\cygdrive\c\...' are possible if str(p_venv).startswith("\\cygdrive"): p_venv = "C:" / Path(str(p_venv)[11:]) - + if any(p_venv == p.parents[1] for p in paths): # Our exe is inside or has access to the virtualenv, don't need to do anything. return