Environment Setup
Required Tools
Miniconda (recommended) or Anaconda
Miniconda is a minimal installer for Conda, which is a package manager for Python and other languages.
Anaconda is a larger distribution that includes many pre-installed packages, but since we are using a custom environment, Anaconda is not necessary.
-
Git is a version control system that allows you to track changes in your code and collaborate with others.
GitHub Desktop is a GUI for Git that simplifies the process of cloning repositories and managing branches.
-
A lightweight code editor that supports many programming languages and has a rich ecosystem of extensions.
It is recommended to use VS Code for development due to its integrated terminal, debugging capabilities, and support for Python development.
Installation Steps
Install Miniconda or Anaconda
The default installer settings are generally fine.
Tip: Check Add Anaconda/Miniconda to my PATH during installation if Python isn’t already on your system.
Install Git
During setup, avoid selecting Vim as the default editor unless you are familiar with it.
Choose Visual Studio Code as the default editor when prompted.
Install GitHub Desktop
Once installed, choose Clone a repository from the Internet, then paste the following URL:
https://github.com/simopt-admin/simopt.gitRemember the local directory you cloned the repository to. This is where you will find the simopt folder.
Install Visual Studio Code
Open the simopt folder in VS Code (File > Open Folder…).
Setup the SimOpt Environment
Open the terminal in VS Code (View > Terminal)
Run the following command(s):
Windows (cmd):
setup_simopt.batWindows (PowerShell):
cmd /c setup_simopt.batMacOS/Linux:
chmod +x setup_simopt.sh && ./setup_simopt.sh
The setup script should automatically activate the environment. If needed later, you can manually activate it with:
conda activate simoptYou can re-run the setup script at any time to update dependencies in the environment.
Install recommended VS Code extensions
Python (ms-python.python)
This will also automatically install the following extensions:
Pylance (ms-python.vscode-pylance)
Debugger (ms-python.debugpy)
Ruff (charliermarsh.ruff)
GitHub Copilot (GitHub.copilot, optional but helpful)
This extension requires a GitHub account with Copilot access.
Access to Copilot is free for students and educators.
You can request access to Copilot through the GitHub Student Developer Pack.
Set the Python interpreter
Open any .py file and look at the bottom-left corner of VS Code.
If the Python environment doesn’t show (simopt), click the interpreter name and select one that includes simopt.
Running the GUI
To run the GUI with debugging, use one of the following methods:
From the menu bar, choosing Run > Start Debugging
Pressing F5
Alternatively, you can run the application without debugging using one of the following methods:
From the menu bar, choosing Run > Run Without Debugging
Pressing Ctrl + F5
Running
python -m simopt.GUIin the terminal
NOTE: If launching via VS Code, you may be prompted to configure a launch environment. Choose Python Module and input simopt.GUI as the module name.