jupyterhub / the-littlest-jupyterhub

Simple JupyterHub distribution for 1-100 users on a single server
https://tljh.jupyter.org
BSD 3-Clause "New" or "Revised" License
1.04k stars 340 forks source link

Environment PATH different in notebook than terminal #698

Closed jeanf57 closed 3 years ago

jeanf57 commented 3 years ago

Bug description

PATH environment variable differ between notebook and terminal

Expected behaviour

Should have access to same libraries in notebook as the terminal

Actual behaviour

Notebook generates error - while it works fine in the terminal

How to reproduce

In notebook I type: !nvcc --version it return : "/bin/bash: nvcc: command not found" in terminal i Type: nvcc --version it return: nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2021 NVIDIA Corporation ...

In notebook I type: !echo $PATH it return : "/opt/tljh/user/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" in terminal i Type: echo $PATH it return: /usr/local/cuda/bin:/opt/tljh/user/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin ^^^^^^^^^^^^^^ not in the notebook

Your personal set up

python --version Python 3.7.3

# jupyterhub_config.py
**none**

sudo -E /opt/tljh/hub/bin/tljh-config show users: admin: