3.4 Installing python and setup
3.4.1 Manual installation
3.4.1.1 uv - Python and package manager
uv is fast and easy to install and use. It not only manages virtual environments, but also makes it easy to install and switch between different python versions. Use the three tabs below to select which type of computer you are using, university or private, windows or unix.
Search for and start cmd.exe
using the start menu, then run the following:
-ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" powershell
This will install uv
to your user profile in e.g., C:\Users\yourusername\.local\bin
Search for and start cmd.exe
using the start menu, then run the following:
-ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" powershell
This will install uv
to your user profile in e.g., C:\Users\yourusername\.local\bin
Start the terminal application, then run the following:
curl -LsSf https://astral.sh/uv/install.sh | sh
3.4.1.2 Install python
Restart cmd.exe
, then run the following:
uv python install
This will install the latest version of python
to your user profile in e.g., C:\Users\yourusername\.local\bin
Restart cmd.exe
, then run the following:
uv python install
This will install the latest version of python
to your user profile in e.g., C:\Users\yourusername\.local\bin
Restart the terminal application, then run the following:
uv python install
3.4.1.3 Create a virtual environment
In cmd.exe
run the following:
cd /d %UserProfile%\"OneDrive - Jonkoping University"
uv venv .venv
This will create a new folder called .venv
in the current directory which contains a fresh python installation. Once the above command has finnished running, “step into” the virtual environment with:
.venv\Scripts\activate.bat
You should now see (venv)
to the left in the terminal, before the path.
Now, we need to install marimo and other packages that we are going to use:
uv pip install marimo numpy sympy matplotlib pandas imageio
This command will download and install the packages, which can take some time depending on your internet connection.
In cmd.exe
run the following:
cd /d %UserProfile%
uv venv .venv
This will create a new folder called .venv
in the current directory which contains a fresh python installation. Once the above command has finnished running, “step into” the virtual environment with:
.venv\Scripts\activate.bat
You should now see (venv)
to the left in the terminal, before the path.
Now, we need to install marimo and other packages that we are going to use:
uv pip install marimo numpy sympy matplotlib pandas imageio
This command will download and install the packages, which can take some time depending on your internet connection.
In the terminal application, run the following:
cd ~
uv venv .venv
This will create a new folder called .venv
in the current directory which contains a fresh python installation. Once the above command has finnished running, “step into” the virtual environment with:
source .venv/bin/activate
You should now see (venv)
to the left in the terminal, before the path.
Now, we need to install marimo and other packages that we are going to use:
uv pip install marimo numpy sympy matplotlib pandas imageio
This command will download and install the packages, which can take some time depending on your internet connection.
3.4.1.4 Starting marimo - shortcut
Start your favourite text-editor and put the following contents in a new file:
call "%UserProfile%\OneDrive - Jonkoping University\.venv\Scripts\activate.bat"
marimo editpause
Save the file as START_MARIMO.bat
somewhere easily acessible, and make sure that you selected “All files” instead of “text files” before you press save.
call %UserProfile%\.venv\Scripts\activate.bat
marimo editpause
Save the file as START_MARIMO.bat
somewhere easily acessible, and make sure that you selected “All files” instead of “text files” before you press save.
#!/bin/bash
source ~/.venv/bin/activate && marimo edit
Save the file as start_marimo.sh
somewhere easily acessible, and then run:
chmod +x start_marimo.sh
Double click your new shortcut to start marimo. It will start from the directory where the shortcut is located, so you might want to move it to a directory where you keep your marimo projects.
3.4.2 Marimo installer (Windows only)
If you want a more user-friendly way to install marimo, you can use the marimo installer for Windows. Download it from here.
- Right-click the downloaded zip file and select “more options” -> properties, then check “unblock” and press OK.
- Double-click the zip file and go into marimo-installer-main and double-click
setup.bat
.
unzip it somewhere easily accessible. Then, run setup.bat
and follow the instructions.
3.4.2.1 What the installer does
The installer will:
- Install the package manager uv
- Install the latest version of Python
- Create a virtual environment at
C:\Users\username\venvs\default
- Install packages, including Marimo, into the virtual environment along with numpy, sympy, matplotlib, pandas, pyqt6, pyqtgraph and scipy. This is configurable using the
requirements.txt
file. - Copy the run scripts to a folder in
C:\Users\username\marimo
and put that folder in your user PATH environment variable - Create shortcuts to launch Marimo
- Create a context menu entry to open folders in Marimo (very useful for opening projects!)
See the installation video below for a step-by-step guide (in swedish):
3.4.2.2 Usage
- You can launch Marimo by right-clicking in a folder and selecting “Open in Marimo” or by using the shortcut created on your desktop.
- You can also run Marimo from the command line by typing
m
. - You can update Marimo and the installed packages by right-clicking on the
update.ps1
file and selecting “Run with PowerShell”. - If you want to uninstall Marimo, you can run the
uninstall.ps1
file and selecting “Run with PowerShell”.
3.4.2.3 Easy .venv setup for new projects for vs-code users
There is a useful file in Scripts called init.bat
which you can copy to a new project folder and double-clicking it will create a virtual environment (.venv) for that project and install the above mentioned packages. Useful if you want to keep dependencies separate between projects. VS-Code will automatically detect the .venv folder and use it as the Python interpreter for that project.