Code Server OnDemand Interactive App
This is our recommended way to use Python within VS Code on the SCC. To launch VS Code from SCC OnDemand, you will need to start a Code Server Interactive App, install the Python plugin, and load your preferred environment (i.e. Python or Conda).
Note: Code Server is an open-source application designed for OnDemand. It does not have access to the Microsoft Marketplace for VS Code extensions. Instead, extensions are installed from the Coder Marketplace.
- Open a browser and login to https://scc-ondemand.bu.edu with your BU credentials.
- Click Interactive Apps > VS Code Server.

- Specify in the the Working Directory field the directory for your files. The default is your home directory.

- Click one of the Python environment options below for further instructions within that package manager:
- On the VS Code Server request page, specify the version of Python you need in the Additional modules to load field. This will setup environment variables to associate the proper resources for your session and set the python interpreter. Click Launch to submit the request.

- Connect to your VS Code Server session and select the extensions icon on the left dashboard
[1]
. Search for the Python extension ms-python [2]
, select it and install [3]
.

- Verify the correct Python interpreter is being loaded by opening your Python script and check the auto-detected interpreter in the bottom right corner.

- If it was not auto-detected, click on the loaded Python interpreter in the bottom right corner to bring up the selection menu. Then choose the correct interpreter.

- On the VS Code Server request page, specify the version of Python you need in the Additional modules to load field AND add the command to source your environment under the Pre-Launch Commands field. This will setup environment variables to associate the proper resources for your session and set the python interpreter. Click Launch to submit the request.

- Connect to your VS Code Server session and select the extensions icon on the left dashboard
[1]
. Search for the Python extension ms-python [2]
, select it and install [3]
.

- Verify the correct Python interpreter is being loaded by opening your Python script and check the auto-detected interpreter in the bottom right corner.

- If it was not auto-detected, click on the loaded Python interpreter in the bottom right corner to bring up the selection menu. Then choose the correct interpreter.

- On the VS Code Server request page, specify the version of Miniconda you need in the Additional modules to load field AND add the command to activate your environment under the Pre-Launch Commands field. This will setup environment variables to associate the proper resources for your session and set the python interpreter. Click Launch to submit the request.

- Connect to your VS Code Server session and select the extensions icon on the left dashboard
[1]
. Search for the Python extension ms-python [2]
, select it and install [3]
.

- Verify the correct Python interpreter is being loaded by opening your Python script and check the auto-detected interpreter in the bottom right corner.

- If it was not auto-detected, click on the loaded Python interpreter in the bottom right corner to bring up the selection menu. Then choose the correct interpreter.

Last updated: April 23, 2024