Unable to launch Galaxy on Windows using WSL

I am trying to run Galaxy on Windows using WSL which is installed with Ubuntu 22.04.
While following the steps to install Galaxy here, I face the error

Activating virtualenv at .venv
ERROR: A virtualenv cannot be found. Please create a virtualenv in .venv, or activate one.

when trying to run the line GALAXY_CLIENT_SKIP_BUILD=1 sh run.sh.
Can someone tell me where I’m going wrong ?
I’ve attached a screenshot for reference…

First of all - Windows WSL is not a supported platform to deploy Galaxy so making it run is going to be difficult and possible only if you have enough insights into how things work under the hood.

It seems your virtualenv activation is silently failing. On supported systems you would create the virtual environment with something like python3 -m venv .venv and then install the dependencies from the requirements.txt into it but I do not know what is the corresponding process with WSL.

a little more info, if you feel like digging deeper:

run.sh imports scrips/common_startup_functions.sh which imports scrips/common_startup.sh, which is where this error that’s thrown lives:

if [ $SET_VENV -eq 1 ] && [ -z "$VIRTUAL_ENV" ]; then
    echo "ERROR: A virtualenv cannot be found. Please create a virtualenv in $GALAXY_VIRTUAL_ENV, or activate one."
    exit 1
fi

If you haven’t used the "--skip-venv" flag then $SET_VENV should be 1, which implies your $VIRTUAL_ENV isn’t set. activating the virtual environment (e.g., . .venv/bin/activate) on a 'nix system sets that variable. here i am checking for that variable before and after activation:

(base) root@f719444d3b5b:/galaxy_venv# env | grep -e ^VIRTUAL_ENV
(base) root@f719444d3b5b:/galaxy_venv# . bin/activate
(galaxy_venv) (base) root@f719444d3b5b:/galaxy_venv# env | grep -e ^VIRTUAL_ENV
VIRTUAL_ENV=/galaxy_venv

is that variable being set properly in your WSL setup? if i look in the venv’s bin/activate i see:

(base) root@f719444d3b5b:/galaxy_venv# cat bin/activate | grep VIRTUAL_ENV
<...some stuff...>
VIRTUAL_ENV='/galaxy_venv'
<...more stuff...>

hope that helps!