Setting up a Development Environment on WSL (old) - UWMRO/Instruments GitHub Wiki
Chances are, you are a Windows user who is looking to use a Linux command line for development. This is the guide to help you get situated.
A. Installing an SSH Client w/ HuskyOnNet (ex. PuTTY) to connect with Analysis. Analysis is the computer that the Andor camera is connected to. While this route gives access to testing with Andor directly, a user needs an account on Analysis itself. This may not be readily available. However, contact AUEG for setting up an SSH client if you are interested regardless.
B. Installing the Windows Subsystem for Linux (WSL). This route is the route that will be covered in this page. WSL allows quick access to a Linux environment if you are a Windows User. However, the main downside is that you will lack access to readily-available testing with the Andor Camera. We hope to remedy this by designing a "dummy server."
- More information available on this guide provided by Microsoft Docs.
-
In the Windows menu, search "Turn Windows features on or off." There will be a box to check that enables WSL. After turning on the option, Windows will ask you to restart. More information
-
Install Ubuntu WSL on the Microsoft Store. You might wonder why there are multiple versions of WSL in the store. They are simply different flavors and releases of WSL. For consistency, select Ubuntu by Canonical Group Limited (NOT Ubuntu 20.04 LTS, 18.04, etc. Just Ubuntu.)
-
Open up the Ubuntu WSL. A terminal/CLI should appear.
-
Run the following commands. These update the repositories that Ubuntu pulls from + install relevant dependencies for developing:
$ sudo apt-get update
$ sudo apt-get install make g++
-
Follow this guide from Microsoft Docs to install nvm, node.js, and npm into your WSL environment.
-
Follow the next guide to install and configure VS Code for use with the WSL environment. We also recommend picking up the WSL extension for VS Code in the guide, as well as the Python extension. The WSL extension allows you to run VS Code with the Ubuntu WSL environment we set up by clicking on the green bottom left button in the VS Code window.
-
Download the latest installer for Anaconda. Despite being on Windows, select the Linux "64-Bit (x86) Installer." The download should be a shell script (with an extension
.sh
), presumably in theDownloads/
folder. -
In the Ubuntu WSL terminal, access the script by issuing the following command:
$ bash /mnt/c/Users/<USERNAME>/Downloads/<Anaconda-Script-Name>.sh
- The phrases in
<>
should be replaced with the actual names.
-
Follow the prompts provided by the
.sh
script. -
You are now ready to follow this guide: Setting up Development Environment for Pybind11