5.2.3. Creating a Python virtual environment#

In this step, you will use Python 3 venv module to create an isolated virtual environment for Galaxy.


For a detailed guide on creating and using virtual environments, read:

-> Python virtual environments

To create the virtual environment:

  1. Change into the galaxy directory:

    cd galaxy
  2. Create virtual environment using .venv as the name.

    python3 -m venv .venv


    The dot (.) in .venv, is important.

  3. Activate the virtual environment:

    source .venv/bin/activate

    Your shell prompt will now change to include (.venv):

    (.venv) user@cookbook:~/programs/galaxy$
  4. Install or upgrade Python build tools:

    pip3 install -U pip setuptools wheel

    This step is necessary, so additional packages will build and install without any issues.

  5. Finally, exit the virtual environment:


In the next step, the start-up script will detect this environment and use it to install all dependencies necessary for running Galaxy.