From 517acad412368b9403f0737edeea983c2d20fe29 Mon Sep 17 00:00:00 2001 From: Caspar Jungbacker <74240267+CasparJungbacker@users.noreply.github.com> Date: Sun, 7 May 2023 12:28:40 +0200 Subject: [PATCH] Add conda init instructions for MacOS --- book/installation-and-setup/vscode-setup.md | 24 +++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/book/installation-and-setup/vscode-setup.md b/book/installation-and-setup/vscode-setup.md index 87d835b..b162149 100644 --- a/book/installation-and-setup/vscode-setup.md +++ b/book/installation-and-setup/vscode-setup.md @@ -15,7 +15,7 @@ When working with Jupyter Book (or Notebooks in general), these extensions are h - [YAML](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) - enables validation of `.yml` files (the format of the Jupyter Book configuration files). ## Getting Anaconda to work in the VS Code terminal - +```{tab} Windows On Windows, Anaconda usually does not work in the integrated VS Code terminal (Powershell). To check if it works for you, open a new terminal in VS Code by going clicking **View > Terminal** in the top menu bar. In the terminal window that appears, type `conda` and execute. If you get help page for `conda`, you're all set. If instead you get something like: conda : the term 'conda' is not recognized ... @@ -33,4 +33,24 @@ then do the following steps: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned 5. The command will ask you for some permissions. To do so, type `A`, then press enter. -6. Restart VS Code, then test by executing `conda` again. This time, it should give you the help page. You now have access to you Anaconda environments in the VS Code terminal. \ No newline at end of file +6. Restart VS Code, then test by executing `conda` again. This time, it should give you the help page. You now have access to you Anaconda environments in the VS Code terminal. +``` +```{tab} MacOS +Usually, Anaconda works by default in the MacOS terminal. To check if it works for you, open a new terminal in VS Code by going clicking **View > Terminal** in the top menu bar. In the terminal window that appears, type `conda` and execute. If you get help page for `conda`, you're all set. If instead you get something like: + + zsh: command not found: conda + +then do the following: + +1. Find out where Anaconda is installed on your system. If you left everything as default during the installation, Anaconda is installed in `/Users//anaconda3` if you used the install script, or in `/Users//opt` if you used the graphical interface to install Anaconda. + +2. Execute the following line: + + source /bin/activate + +3. Then: + + conda init zsh + +4. Restart VS Code, then test by executing `conda` again. This time, it should give you the help page. You now have access to you Anaconda environments in the VS Code terminal. +``` \ No newline at end of file