Installation¶
In this tutorial you make a project folder and install redsun in it. You'll
do all the tutorials that follow in that folder.
Before you start¶
What you need
uv, which makes the project, installs the
packages and runs the scripts. Its documentation shows how to install
it. You don't
need to install Python yourself, because uv fetches it for you.
1. Make the project¶
Open a terminal in the place where you keep your work, and make a project
called my-microscope:
The new folder holds two files: pyproject.toml lists what the project needs,
and .python-version says which Python runs it.
Go into the folder, since you run every command of the tutorials from there:
2. Install redsun¶
Add redsun to the project, with
PyQt6 to draw its windows:
uv makes a virtual environment in the folder, called .venv, and installs
redsun in it. You never need to activate that environment, because
uv run uses it for you.
3. Check that it works¶
The command prints the version you installed:
What you built¶
You made a project folder, my-microscope, with redsun and pyqt6
installed in an environment of its own.
Next steps¶
- Writing your first session is the next tutorial, where you build a window with a button that moves a stage.
- How to install redsun covers other tools, the other Qt binding, and the extras for storing data.