We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc014ab commit 1af4ff4Copy full SHA for 1af4ff4
IPython/core/interactiveshell.py
@@ -900,7 +900,7 @@ def init_virtualenv(self):
900
return
901
902
p = Path(sys.executable)
903
- p_venv = Path(os.environ["VIRTUAL_ENV"])
+ p_venv = Path(os.environ["VIRTUAL_ENV"]).resolve()
904
905
# fallback venv detection:
906
# stdlib venv may symlink sys.executable, so we can't use realpath.
@@ -913,7 +913,7 @@ def init_virtualenv(self):
913
drive_name = p_venv.parts[2]
914
p_venv = (drive_name + ":/") / Path(*p_venv.parts[3:])
915
916
- if any(p_venv == p.parents[1] for p in paths):
+ if any(p_venv == p.parents[1].resolve() for p in paths):
917
# Our exe is inside or has access to the virtualenv, don't need to do anything.
918
919
0 commit comments