Jupyter Extension in VSCode does not recognize updated environment variables from host's $HOME/.bashrc #14571
Closed
1 of 2 tasks
Labels
bug
Issue identified by VS Code Team member as probable bug
Applies To
What happened?
Environment
pip list
Description
When using the Jupyter notebook kernel in VSCode via SSH, the extension does not recognize the latest environment variables written in the host OS's
$HOME/.bashrc
. Interestingly, it's not defaulting to a completely default set of environment variables. Instead, it seems to retain environment variables from a previous version of the.bashrc
. Attempts to update variables likeLD_LIBRARY_PATH
andLIBRARY_PATH
using%set_env
do not resolve Python import errors related to these variables.Steps to Reproduce:
$HOME/.bashrc
on the host OS.What I've tried:
$HOME/.vscode-server
..bashrc
,.bash_profile
, and.profile
.Expected Behavior:
The Jupyter notebook kernel in VSCode should recognize and utilize the latest environment variables from the host's
.bashrc
.Actual Behavior:
The kernel does not recognize the most recent environment variables, and instead seems to retain an older version of them.
Additional Context
What I was trying to accomplish
I was trying to utilize the GPAW, a Python-based DFT (Density Functional Theory) calculation tool. For the purpose of building GPAW:
aocc
compiler andaocl
numerical computation library in the/opt
directory.aocc
compiler was listed in the.bashrc
. Currently, this is the only part that Jupyter in VSCode seems to recognize.LD_LIBRARY_PATH
andLIBRARY_PATH
in.bashrc
to facilitate the building of GPAW using AMD'sblis
,flame
and other related libraries.What's working
gpaw
from the terminal also works without any issues.gpaw
within that session is successful.gpaw
within those sessions also correctly recognizes the environment variables. This is consistent whether accessed directly or over SSH.What's not working
When trying to use
.ipynb
notebooks directly in VSCode, the issue arises and the environment variables aren't recognized correctly, leading to failures in usinggpaw
.VS Code Version
1.83.1
Jupyter Extension Version
v2023.9.1102792234
Jupyter logs
Coding Language and Runtime Version
Python v3.11.6
Language Extension Version (if applicable)
No response
Anaconda Version (if applicable)
No response
Running Jupyter locally or remotely?
Remote
The text was updated successfully, but these errors were encountered: