Setup Environment (Windows/Linux)
Learn how setup a WSL development environment, install all required packages and libraries, set up an SSH key and install Vs Code.
WSL: For Windows Only
Installing WSL
Development will be primarily done in WSL (Windows Subsystem for Linux) as it standardizes the libraries and packages needed.
If you have not installed it already, please run the following command in your terminal:
wsl.exe --install --d Ubuntu-22.04
For more information, please refer to this guide
Running WSL
If you are running a terminal, the easiest way to launch WSL is to click the Dropdown Banner in the top left and then select your WSL distribution.

Once you are running your WSL terminal, the steps will be the same as if you were on native linux.
Setting Up Packages
Apt Packages
In any Linux distribution , the first thing to do is to fetch all the new package updates
Run this command to fetch all updates:
sudo apt update
Once you have fetched all updates, its time to download all the packages needed.
Run this command to download and install them (The -y means to automatically say yes):
sudo apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev libhdf5-dev tesseract-ocr git-lfs
PyEnv
Once all your apt dependencies are installed, its time to set up the python environment.
We will be using a virtual environment manager called PyEnv.
To install please run:
curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
This will automatically fetch and install PyEnv on your machine. To finish the setup run:
cat <<'EOF' >> $HOME/.bashrc
if [[ -x $(command -v pyenv) ]]; then
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
fi
EOF
Now, PyEnv is ready, and its time to create the python environment.
Python Environment and Libraries
First you need to clone the project repo using this command:
(Please make sure you are in the directory you want to clone into before running the command)
git clone git@github.com:Team488/Alt.git
If you have used git clone before, you might notice that the url is not a typical web url. This will be explained below.
Now change into the Alt directory:
cd Alt
And finally, run the setup script to create the python environment.
./setup.sh
This command will take some time as it downloads everything needed for the python environment
Git LFS
Since we have some large AI models, and other files that are too large for GitHub to handle normally we use Git LFS (Large File Storage) to keep track of them.
At this point the git-lfs apt package should already be installed so we only need to run a couple simple commands to download the large files
git lfs install
git lfs fetch
git lfs pull
Final Steps
SSH Keys
Before you can get started coding, you need to create a ssh key to push your changes to GitHub.
This is because the repository we use is private and limited to team members only
(Note: this means you must be added to the Vision GitHub team by one of the mentors)
(This is also why we cloned the repository with the ssh url instead of https url)
To generate a key run the following:
ssh-keygen -t ed25519 -C "your_email@example.com"
Unless you know what you are doing, the best choice will be to go with the default options when generating a key.
Now that your key has been created, you need to add the public key to your GitHub.
The public key location will be displayed as follows, you can run cat to display the file and get the key

cat /home/yourpath/.ssh/id_ed25519.pub
Now add it to your GitHub by going to your account -> settings -> SSH and GPG keys.
Add the key and give it a name, then it's ready.

Vs Code
The very final step is to install our code editor of choice, Vs Code.
Run this command, and it will be installed:
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/keyrings/microsoft-archive-keyring.gpg
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/microsoft-archive-keyring.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
Now, you can open a Vs Code instance in the current directory by running:
code .
Last updated