-
-
Notifications
You must be signed in to change notification settings - Fork 391
Open
Description
Description
After updating to the latest version of ipykernel
, the environment variable PYTHONPATH
set in my shell is no longer reflected inside Jupyter notebooks.
Previously, I could import my own local modules directly, e.g.:
from my_module import my_function
where my_module.py
is located in a custom folder appended to PYTHONPATH
in my .bashrc
:
export PYTHONPATH="$PYTHONPATH:/path/to/custom/library"
After the update, notebooks in vscode no longer find these modules unless I manually add the path within the notebook using:
import sys
sys.path.append("/path/to/custom/library")
Expected behavior
Jupyter kernels should inherit the PYTHONPATH
from the parent shell (as they did prior to the update).
Actual behavior
PYTHONPATH
is ignored; sys.path
inside the kernel does not contain my custom directory.
Metadata
Metadata
Assignees
Labels
No labels