- Course Overview
- Tool Setup
- Online Research Tips
- Further Reading and Helpful Links
- See the great work by Matt Watkins collecting examples. Sorry example links only accessible to students of the DU AI Courses.
- Resources
- Cheatsheets & Tips
- Books
- Articles
- Subscriptions
- Career Engagement
- Data Sources
Insure that you have installed windows terminal. See instructions here:
-
Open terminal and start WSL
wsl
Install python on WSL
This will install python and pip on WSL. PIP is a package manager for Python packages.
sudo apt upgrade
sudo apt install python3 python3-pip
sudo ln -s /usr/bin/python3 /usr/bin/python
Then verify the install and check python version
python --version
There are two options - Anaconda and miniconda.
- Anaconda and Miniconda are both Python distributions.
- Anaconda includes hundreds (~3000) of packages, whereas Miniconda includes just a few.
- conda is an open source tool that comes with both Anaconda and Miniconda, and it functions as both a package manager and an environment manager.
- To install Anaconda on WSL use the Installing Anaconda on Linux instructions.
- To install Miniconda on WSL use the Installing Miniconda on Linux instructions.
Miniconda Install Summary:
These four commands quickly and quietly install the latest 64-bit version of the installer and then clean up after themselves. To install a different version or architecture of Miniconda for Linux, change the name of the .sh
installer in the wget
command.
mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm -rf ~/miniconda3/miniconda.sh
After installing, initialize your newly-installed Miniconda.
# Replace <PATH_TO_CONDA> with the path to your conda install
#source <PATH_TO_CONDA>/bin/activate
source ~/miniconda/bin/activate
conda init
The following commands initialize for bash and zsh shells:
~/miniconda3/bin/conda init bash
~/miniconda3/bin/conda init zsh
Verify Miniconda version:
conda --version
Add conda-forge to support some newer versions of packages
conda config --add channels conda-forge
conda config --set channel_priority strict
conda create --name dev
conda activate dev
Follow the instructions for installing git on linux
Summary:
sudo apt install git-all
then check the git version
git --version
See the github token section of the windows tool install. The difference for wsl is that you will use windows terminal with wsl instead of git-bash.
See the gitlab SSH key section of the windows tool install. The difference for wsl is that you will use windows terminal with wsl instead of git-bash.
Summary:
install xclip
sudo apt install xclip
See any existing keys
ls –al ~/.ssh
Generate a new key
ssh-keygen –t rsa
# enter a passphrase
Link your key to your machine
eval `ssh-agent -s`
ssh-add ~/.ssh/id_rsa
To copy your public key:
xclip < ~/.ssh/id_rsa.pub
Alternate - to copy your public key:
cat id_rsa.pub
#copy string starting with SHA256 to end of line.
Go to GitLab's SSH key preferences
- This is under your profile -> SSH keys
Reset the local repo to match the remote repo.
This typically works:
git reset HEAD~
For a full reset to match the remote repo
git fetch origin
git reset --hard origin/master
Install VSCode on windows. This VSCode instance can connect to WSL for your windows python environment. In this case VSCode extensions will be installed either for your windows environment or for your connected WSL connected environment.
In order to get the maximum usefulness out of this setup, you need to install a couple of extensions:
In VSCode click on the remote connection iscon in the lower left corner of the VSCode window.
- Select the WSL installation to use.
Extensions may be installed in the default area of VSCode for the native windows use. They may also be installed in a WSL Connection area for use with the WSL environment.
Extensions in WSL area:
- python
- python debugger
- Jupyter
- Jupyter Cell Tags
- Jupyter Notebook Renderers
- Supyter Slide Show
- Jupyter Keymap
- markdownlint
- rainbow csv