2 KiB
VS Code
VS Code is a text editor with some extra features, such as integrated source control and a file browser. Moreover, extensions are available to add functionality to VS Code.
Installation
VS Code can be downloaded from here. The installation is fairly simple and won't be covered here.
Extensions
When working with Jupyter Book (or Notebooks in general), these extensions are highly recommended:
- Python - for obvious reasons. Also includes Jupyter Notebook rendering.
- MyST-Markdown - adds support for MyST markdown, including previews.
- YAML - enables validation of
.ymlfiles (the format of the Jupyter Book configuration files).
Getting Anaconda to work in the VS Code terminal
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 ...
then do the following steps:
-
Open Anaconda prompt as administrator.
-
Execute the following command:
conda init --all -
Close the Anaconda prompt. Then, open a Powershell window as administrator (go to the Start menu, type Powershell, then open Windows Powershell as administrator).
-
In the Powershell window, execute the following command:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -
The command will ask you for some permissions. To do so, type
A, then press enter. -
Restart VS Code, then test by executing
condaagain. This time, it should give you the help page. You now have access to you Anaconda environments in the VS Code terminal.