diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 346205fc..a11b5470 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -9,9 +9,9 @@ jobs:
       runs-on: macos-13
 
       steps:
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
       - name: Set up Python 3.9
-        uses: actions/setup-python@v3
+        uses: actions/setup-python@v5
         with:
           python-version: 3.9
       - name: Install dependencies with conda
@@ -25,9 +25,9 @@ jobs:
       runs-on: ubuntu-latest
 
       steps:
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
       - name: Set up Python 3.9
-        uses: actions/setup-python@v3
+        uses: actions/setup-python@v5
         with:
           python-version: 3.9
       - name: Install dependencies with conda
@@ -40,6 +40,6 @@ jobs:
         run: |
             source $CONDA/etc/profile.d/conda.sh && conda activate gubbins_env && export LDFLAGS="-L${CONDA_PREFIX}/lib/ -Wl,-rpath,${CONDA_PREFIX}/lib/ --coverage" && export CFLAGS="-I${CONDA_PREFIX}/include/ --coverage" && export PATH=$PATH:/lib/python3.9/site-packages/ && export NUMBA_DISABLE_JIT=1 && autoreconf -i && ./configure --prefix=$CONDA_PREFIX --exec_prefix $CONDA_PREFIX -enable-code-coverage CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" --host=x86_64-linux-gnu --build=x86_64-linux-gnu && make && make install && export CODE_COVERAGE_OUTPUT_FILE="gubbins_coverage.info" && make check && make check-code-coverage
       - name: Upload python code coverage analysis
-        uses: codecov/codecov-action@v2
+        uses: codecov/codecov-action@v4
         with:
             files: ./python/coverage.xml,gubbins_coverage.info
diff --git a/VERSION b/VERSION
index bea438e9..fa7adc7a 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.3.1
+3.3.5
diff --git a/environment.yml b/environment.yml
index 6d961b74..bde92a3d 100644
--- a/environment.yml
+++ b/environment.yml
@@ -6,7 +6,7 @@ channels:
   - r
 dependencies:
 # python
-  - python>=3.8
+  - python>=3.8,<3.11
 # installation
   - autoconf
   - automake
diff --git a/python/gubbins/PreProcessFasta.py b/python/gubbins/PreProcessFasta.py
index bb91fa7e..5714cd1a 100644
--- a/python/gubbins/PreProcessFasta.py
+++ b/python/gubbins/PreProcessFasta.py
@@ -1,3 +1,6 @@
+#!/usr/bin/env python
+# encoding: utf-8
+
 import sys
 import hashlib
 from Bio import AlignIO
diff --git a/python/gubbins/ValidateFastaAlignment.py b/python/gubbins/ValidateFastaAlignment.py
index 85d3c0a1..5be757f2 100644
--- a/python/gubbins/ValidateFastaAlignment.py
+++ b/python/gubbins/ValidateFastaAlignment.py
@@ -1,3 +1,6 @@
+#!/usr/bin/env python
+# encoding: utf-8
+
 import os
 import re
 import sys
diff --git a/python/gubbins/__init__.py b/python/gubbins/__init__.py
index 06010447..6aed4ed7 100644
--- a/python/gubbins/__init__.py
+++ b/python/gubbins/__init__.py
@@ -1,4 +1,5 @@
-#! /usr/bin/env python3
+#!/usr/bin/env python
+# encoding: utf-8
 
 """
 Imports into the `gubbins` namespace all fundamental
diff --git a/python/gubbins/common.py b/python/gubbins/common.py
index c9e3bf39..f48ed1bc 100644
--- a/python/gubbins/common.py
+++ b/python/gubbins/common.py
@@ -1,4 +1,6 @@
+#!/usr/bin/env python
 # encoding: utf-8
+#
 # Wellcome Trust Sanger Institute
 # Copyright (C) 2013  Wellcome Trust Sanger Institute
 # 
@@ -224,7 +226,7 @@ def parse_and_run(input_args, program_description=""):
     printer.print("...done. Run time: {:.2f} s".format(time.time() - start_time))
 
     # Find all SNP sites with Gubbins
-    gubbins_command = " ".join([gubbins_exec, input_args.alignment_filename])
+    gubbins_command = f"{gubbins_exec} \"{input_args.alignment_filename}\""
     printer.print(["\nRunning Gubbins to detect SNPs...", gubbins_command])
     try:
         subprocess.check_call(gubbins_command, shell=True)
diff --git a/python/gubbins/pyjar.py b/python/gubbins/pyjar.py
index 982889c4..2cdc15a7 100755
--- a/python/gubbins/pyjar.py
+++ b/python/gubbins/pyjar.py
@@ -1,5 +1,6 @@
-#!/usr/bin/env python3
-
+#!/usr/bin/env python
+# encoding: utf-8
+#
 # pyjar written by Simon Harris
 # code modified from https://github.com/simonrharris/pyjar
 # pyjar is free software, licensed under GPLv3.
diff --git a/python/gubbins/run_gubbins.py b/python/gubbins/run_gubbins.py
index 96e5f544..61969272 100755
--- a/python/gubbins/run_gubbins.py
+++ b/python/gubbins/run_gubbins.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 # encoding: utf-8
 #
 # Wellcome Trust Sanger Institute
diff --git a/python/gubbins/treebuilders.py b/python/gubbins/treebuilders.py
index 01546e71..5f531a53 100644
--- a/python/gubbins/treebuilders.py
+++ b/python/gubbins/treebuilders.py
@@ -1,4 +1,6 @@
+#!/usr/bin/env python
 # encoding: utf-8
+#
 # Wellcome Trust Sanger Institute
 # Copyright (C) 2013  Wellcome Trust Sanger Institute
 #
diff --git a/python/gubbins/utils.py b/python/gubbins/utils.py
index fdc4dbd3..dc19a8fe 100644
--- a/python/gubbins/utils.py
+++ b/python/gubbins/utils.py
@@ -1,4 +1,6 @@
+#!/usr/bin/env python
 # encoding: utf-8
+#
 # Wellcome Trust Sanger Institute
 # Copyright (C) 2013  Wellcome Trust Sanger Institute
 #