From 1cc29df1fdeb1063a7a7d31b4aa846aa4978545b Mon Sep 17 00:00:00 2001 From: GeorgianaElena Date: Thu, 30 Jan 2020 19:53:58 +0200 Subject: [PATCH] Preserve PATH when using sudo --- docs/howto/env/user-environment.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/howto/env/user-environment.rst b/docs/howto/env/user-environment.rst index 66c0144..72ef43a 100644 --- a/docs/howto/env/user-environment.rst +++ b/docs/howto/env/user-environment.rst @@ -179,31 +179,31 @@ To upgrade the Python version of the user environment, one can: 1. Activate the user environment, if using ssh. If the terminal was started with JupyterHub, this step can be skipped: - .. code-block:: console + .. code-block:: bash source /opt/tljh/user/bin/activate 2. Get the list of currently installed pip packages (so you can later install them under the new Python): - .. code-block:: console + .. code-block:: bash pip freeze > pip_pkgs.txt 3. Update all conda installed packages in the environment: - .. code-block:: console + .. code-block:: bash - sudo conda update --all + sudo PATH=${PATH} conda update --all 4. Update Python version: - .. code-block:: console + .. code-block:: bash - conda install python=3.7 + sudo PATH=${PATH} conda install python=3.7 5. Install the pip packages previously saved: - .. code-block:: console + .. code-block:: bash pip install pip_pkgs.txt