diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 70c92ee..ea3e6ea 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -38,6 +38,7 @@ features
 * support passing log levels to SETUPTOOLS_SCM_DEBUG
 * support using rich.logging as console log handler if installed
 * fix #527: type annotation in default version template
+* fix #549: use fallbacks when scm search raises CommandNotFoundError
 
 bugfixes
 --------
diff --git a/src/setuptools_scm/_entrypoints.py b/src/setuptools_scm/_entrypoints.py
index 8350968..e3be053 100644
--- a/src/setuptools_scm/_entrypoints.py
+++ b/src/setuptools_scm/_entrypoints.py
@@ -13,8 +13,8 @@ from . import _log
 from . import version
 
 if TYPE_CHECKING:
-    from ._config import Configuration
     from . import _types as _t
+    from ._config import Configuration, ParseFunction
 
 
 log = _log.log.getChild("entrypoints")
@@ -27,21 +27,14 @@ class EntrypointProtocol(Protocol):
         pass
 
 
-def _version_from_entrypoints(
-    config: Configuration, fallback: bool = False
+def version_from_entrypoint(
+    config: Configuration, entrypoint: str, root: _t.PathT
 ) -> version.ScmVersion | None:
-    if fallback:
-        entrypoint = "setuptools_scm.parse_scm_fallback"
-        root = config.fallback_root
-    else:
-        entrypoint = "setuptools_scm.parse_scm"
-        root = config.absolute_root
-
     from .discover import iter_matching_entrypoints
 
     log.debug("version_from_ep %s in %s", entrypoint, root)
     for ep in iter_matching_entrypoints(root, entrypoint, config):
-        fn = ep.load()
+        fn: ParseFunction = ep.load()
         maybe_version: version.ScmVersion | None = fn(root, config=config)
         log.debug("%s found %r", ep, maybe_version)
         if maybe_version is not None:
diff --git a/src/setuptools_scm/_get_version.py b/src/setuptools_scm/_get_version.py
index a1afe2d..d2fe9e1 100644
--- a/src/setuptools_scm/_get_version.py
+++ b/src/setuptools_scm/_get_version.py
@@ -1,5 +1,6 @@
 from __future__ import annotations
 
+import logging
 import re
 import warnings
 from pathlib import Path
@@ -8,30 +9,41 @@ from typing import NoReturn
 from typing import Pattern
 
 from . import _config
+from . import _entrypoints
+from . import _run_cmd
 from . import _types as _t
 from ._config import Configuration
-from ._entrypoints import _version_from_entrypoints
 from ._overrides import _read_pretended_version_for
 from ._version_cls import _validate_version_cls
 from .version import format_version as _format_version
 from .version import ScmVersion
 
+_log = logging.getLogger(__name__)
+
 
 def parse_scm_version(config: Configuration) -> ScmVersion | None:
-    if config.parse is not None:
-        parse_result = config.parse(config.absolute_root, config=config)
-        if parse_result is not None and not isinstance(parse_result, ScmVersion):
-            raise TypeError(
-                f"version parse result was {str!r}\n"
-                "please return a parsed version (ScmVersion)"
-            )
-        return parse_result
-    else:
-        return _version_from_entrypoints(config)
+    try:
+        if config.parse is not None:
+            parse_result = config.parse(config.absolute_root, config=config)
+            if parse_result is not None and not isinstance(parse_result, ScmVersion):
+                raise TypeError(
+                    f"version parse result was {str!r}\n"
+                    "please return a parsed version (ScmVersion)"
+                )
+            return parse_result
+        else:
+            entrypoint = "setuptools_scm.parse_scm"
+            root = config.absolute_root
+            return _entrypoints.version_from_entrypoint(config, entrypoint, root)
+    except _run_cmd.CommandNotFoundError as e:
+        _log.exception("command %s not found while parsing the scm, using fallbacks", e)
+        return None
 
 
 def parse_fallback_version(config: Configuration) -> ScmVersion | None:
-    return _version_from_entrypoints(config, fallback=True)
+    entrypoint = "setuptools_scm.parse_scm_fallback"
+    root = config.fallback_root
+    return _entrypoints.version_from_entrypoint(config, entrypoint, root)
 
 
 def _do_parse(config: Configuration) -> ScmVersion | None:
diff --git a/src/setuptools_scm/_run_cmd.py b/src/setuptools_scm/_run_cmd.py
index 3c938d8..046749a 100644
--- a/src/setuptools_scm/_run_cmd.py
+++ b/src/setuptools_scm/_run_cmd.py
@@ -189,6 +189,10 @@ def has_command(
     return res
 
 
+class CommandNotFoundError(LookupError, FileNotFoundError):
+    pass
+
+
 def require_command(name: str) -> None:
     if not has_command(name, warn=False):
-        raise OSError(f"{name!r} was not found")
+        raise CommandNotFoundError(name)

diff --git a/testing/test_git.py b/testing/test_git.py
index cec9afa..8bebd1e 100644
--- a/testing/test_git.py
+++ b/testing/test_git.py
@@ -24,6 +24,7 @@ from setuptools_scm import Configuration
 from setuptools_scm import git
 from setuptools_scm import NonNormalizedVersion
 from setuptools_scm._file_finders.git import git_find_files
+from setuptools_scm._run_cmd import CommandNotFoundError
 from setuptools_scm._run_cmd import CompletedProcess
 from setuptools_scm._run_cmd import has_command
 from setuptools_scm._run_cmd import run
@@ -93,8 +94,12 @@ setup(use_scm_version={"search_parent_directories": True})
 
 def test_git_gone(wd: WorkDir, monkeypatch: pytest.MonkeyPatch) -> None:
     monkeypatch.setenv("PATH", str(wd.cwd / "not-existing"))
-    with pytest.raises(EnvironmentError, match="'git' was not found"):
-        git.parse(str(wd.cwd), Configuration(), git.DEFAULT_DESCRIBE)
+
+    wd.write("pyproject.toml", "[tool.setuptools_scm]")
+    with pytest.raises(CommandNotFoundError, match=r"git"):
+        git.parse(wd.cwd, Configuration(), git.DEFAULT_DESCRIBE)
+
+    assert wd.get_version(fallback_version="1.0") == "1.0"
 
 
 @pytest.mark.issue("https://github.com/pypa/setuptools_scm/issues/298")
diff --git a/testing/test_mercurial.py b/testing/test_mercurial.py
index 1b35d11..3aa8594 100644
--- a/testing/test_mercurial.py
+++ b/testing/test_mercurial.py
@@ -7,6 +7,7 @@ import pytest
 
 import setuptools_scm._file_finders
 from setuptools_scm import Configuration
+from setuptools_scm._run_cmd import CommandNotFoundError
 from setuptools_scm._run_cmd import has_command
 from setuptools_scm.hg import archival_to_version
 from setuptools_scm.hg import parse
@@ -55,8 +56,11 @@ def test_archival_to_version(expected: str, data: dict[str, str]) -> None:
 def test_hg_gone(wd: WorkDir, monkeypatch: pytest.MonkeyPatch) -> None:
     monkeypatch.setenv("PATH", str(wd.cwd / "not-existing"))
     config = Configuration()
-    with pytest.raises(EnvironmentError, match="'hg' was not found"):
-        parse(str(wd.cwd), config=config)
+    wd.write("pyproject.toml", "[tool.setuptools_scm]")
+    with pytest.raises(CommandNotFoundError, match=r"hg"):
+        parse(wd.cwd, config=config)
+
+    assert wd.get_version(fallback_version="1.0") == "1.0"
 
 
 def test_find_files_stop_at_root_hg(

Use fallback_version if SCM isn't found
I'm in some situation (testing my package in Docker) where git isn't available, and thought I could just use `fallback_version` argument, but it turns out I still get an exception `OSError: 'git' was not found`. 

I found I can overcome this by defining the `SETUPTOOLS_SCM_PRETEND_VERSION` environment variable, but I thought it would be easier to use `fallback_version` in this case as well?

I'm not sure I understood the different cases where one should use `SETUPTOOLS_SCM_PRETEND_VERSION` or `fallback_version`?
testing/test_git.py::test_parse_describe_output[3.3.1-rc26-0-g9df187b-3.3.1-rc26-0-g9df187b-False] testing/test_git.py::test_parse_describe_output[17.33.0-rc-17-g38c3047c0-17.33.0-rc-17-g38c3047c0-False] testing/test_git.py::test_root_relative_to testing/test_git.py::test_root_search_parent_directories testing/test_git.py::test_git_gone testing/test_git.py::test_file_finder_no_history testing/test_git.py::test_parse_call_order testing/test_git.py::test_version_from_git testing/test_git.py::test_git_version_unnormalized_setuptools[false] testing/test_git.py::test_git_version_unnormalized_setuptools[with_created_class] testing/test_git.py::test_git_version_unnormalized_setuptools[with_named_import] testing/test_git.py::test_unicode_version_scheme testing/test_git.py::test_git_worktree testing/test_git.py::test_git_dirty_notag[False] testing/test_git.py::test_git_dirty_notag[True] testing/test_git.py::test_git_parse_shallow_warns testing/test_git.py::test_git_parse_shallow_fail testing/test_git.py::test_git_shallow_autocorrect testing/test_git.py::test_find_files_stop_at_root_git testing/test_git.py::test_parse_no_worktree testing/test_git.py::test_alphanumeric_tags_match testing/test_git.py::test_git_archive_export_ignore testing/test_git.py::test_git_archive_subdirectory testing/test_git.py::test_git_archive_run_from_subdirectory testing/test_git.py::test_git_branch_names_correct testing/test_git.py::test_git_feature_branch_increments_major testing/test_git.py::test_not_matching_tags testing/test_git.py::test_non_dotted_version testing/test_git.py::test_non_dotted_version_with_updated_regex testing/test_git.py::test_non_dotted_tag_no_version_match testing/test_git.py::test_gitdir testing/test_git.py::test_git_getdate testing/test_git.py::test_git_getdate_badgit testing/test_git.py::test_git_getdate_signed_commit testing/test_git.py::test_git_archival_to_version[1.0-from_data0] testing/test_git.py::test_git_archival_to_version[1.1.dev3+g0000-from_data1] testing/test_git.py::test_git_archival_to_version[0.0-from_data2] testing/test_git.py::test_git_archival_to_version[1.2.2-from_data3] testing/test_git.py::test_git_archival_to_version[1.2.2.dev0-from_data4] testing/test_git.py::test_git_archival_to_version[1.2.2-from_data5] testing/test_git.py::test_git_archival_node_missing_no_version testing/test_git.py::test_git_archival_from_unfiltered testing/test_mercurial.py::test_archival_to_version[0.0-data0] testing/test_mercurial.py::test_archival_to_version[1.0-data1] testing/test_mercurial.py::test_archival_to_version[1.1.dev3+h000000000000-data2] testing/test_mercurial.py::test_archival_to_version[1.2.2-data3] testing/test_mercurial.py::test_archival_to_version[1.2.2.dev0-data4] testing/test_mercurial.py::test_hg_gone testing/test_mercurial.py::test_find_files_stop_at_root_hg testing/test_mercurial.py::test_version_from_hg_id testing/test_mercurial.py::test_version_from_archival testing/test_mercurial.py::test_version_in_merge testing/test_mercurial.py::test_parse_no_worktree testing/test_mercurial.py::test_version_bump_before_merge_commit testing/test_mercurial.py::test_version_bump_from_merge_commit testing/test_mercurial.py::test_version_bump_from_commit_including_hgtag_mods testing/test_mercurial.py::test_latest_tag_detection testing/test_mercurial.py::test_feature_branch_increments_major