Skip to content

Commit

Permalink
Fix: ipykernel_launcher, delete absolute sys.path[0] (#1206)
Browse files Browse the repository at this point in the history
  • Loading branch information
stdll00 committed Feb 7, 2024
1 parent e8dd961 commit edbbd63
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ipykernel_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
"""

import sys
from pathlib import Path

if __name__ == "__main__":
# Remove the CWD from sys.path while we load stuff.
# This is added back by InteractiveShellApp.init_path()
if sys.path[0] == "":
if sys.path[0] == "" or Path(sys.path[0]) == Path.cwd():
del sys.path[0]

from ipykernel import kernelapp as app
Expand Down

0 comments on commit edbbd63

Please sign in to comment.