Skip to content

Commit edbbd63

Browse files
authored
Fix: ipykernel_launcher, delete absolute sys.path[0] (#1206)
1 parent e8dd961 commit edbbd63

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ipykernel_launcher.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
"""
66

77
import sys
8+
from pathlib import Path
89

910
if __name__ == "__main__":
1011
# Remove the CWD from sys.path while we load stuff.
1112
# This is added back by InteractiveShellApp.init_path()
12-
if sys.path[0] == "":
13+
if sys.path[0] == "" or Path(sys.path[0]) == Path.cwd():
1314
del sys.path[0]
1415

1516
from ipykernel import kernelapp as app

0 commit comments

Comments
 (0)