diff --git a/numba/sigutils.py b/numba/sigutils.py
index e37b2c0c0..8c3c562b3 100644
--- a/numba/sigutils.py
+++ b/numba/sigutils.py
@@ -31,13 +31,16 @@ def normalize_signature(sig):
     elif isinstance(parsed, typing.Signature):
         args, return_type = parsed.args, parsed.return_type
     else:
-        raise TypeError("invalid signature: %r instance not allowed"
-                        % (sig.__class__.__name__,))
+        raise TypeError("invalid signature: %r (type: %r) evaluates to %r "
+                        "instead of tuple or Signature" % (
+                            sig, sig.__class__.__name__,
+                            parsed.__class__.__name__
+                        ))
 
     def check_type(ty):
         if not isinstance(ty, types.Type):
-            raise TypeError("invalid signature: expected a type instance, "
-                            "got %r" % (ty,))
+            raise TypeError("invalid type in signature: expected a type "
+                            "instance, got %r" % (ty,))
 
     if return_type is not None:
         check_type(return_type)

Fix needed for invalid signature specification error message
<!--

Thanks for opening an issue! To help the Numba team handle your information
efficiently, please first ensure that there is no other issue present that
already describes the issue you have
(search at https://github.com/numba/numba/issues?&q=is%3Aissue).

For more general "how do I do X?" type questions, please speak to us in real
time on https://gitter.im/numba/numba or post to the Numba mailing list
https://groups.google.com/a/continuum.io/forum/#!forum/numba-users.

-->

## Feature request

<!--

Please include details of the feature you would like to see, why you would
like to see it/the use case

-->

```python
from numba import njit
@njit(['f8',])
def foo(a):
    return 1
```
the above is invalid as the signature makes no sense, however the error message says:
```
  File "gi53.py", line 20, in <module>
    @njit(['f8',])
  File "<path>/numba/numba/decorators.py", line 183, in wrapper
    disp.compile(sig)
  File "<path>/numba/numba/compiler_lock.py", line 32, in _acquire_compile_lock
    return func(*args, **kwargs)
  File "<path>/numba/numba/dispatcher.py", line 641, in compile
    args, return_type = sigutils.normalize_signature(sig)
  File "<path>/numba/numba/sigutils.py", line 35, in normalize_signature
    % (sig.__class__.__name__,))
TypeError: invalid signature: 'str' instance not allowed
```
fix this so it reports something more useful!
diff --git a/numba/tests/test_types.py b/numba/tests/test_types.py
index 1ef4fc88b..bafcd22f8 100644
--- a/numba/tests/test_types.py
+++ b/numba/tests/test_types.py
@@ -498,8 +498,9 @@ class TestSignatures(TestCase):
         check("(complex64, int16)", (c64, i16), None)
         check(typing.signature(i16, c64), (c64,), i16)
 
-        check_error((types.Integer,), "invalid signature")
-        check_error((None,), "invalid signature")
+        msg = "invalid type in signature: expected a type instance"
+        check_error((types.Integer,), msg)
+        check_error((None,), msg)
         check_error([], "invalid signature")
 
 

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest
apt-get update apt-get install -y gcc g++
3.7
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
certifi @ file:///croot/certifi_1671487769961/work/certifi
exceptiongroup==1.2.2
importlib-metadata==6.7.0
iniconfig==2.0.0
llvmlite==0.39.1
-e git+https://github.com/numba/numba.git@8cbe10b62488d95bc119090b79c14bb2e9474850#egg=numba
numpy==1.21.6
packaging==24.0
pluggy==1.2.0
pytest==7.4.4
tomli==2.0.1
typing_extensions==4.7.1
zipp==3.15.0

name: numba
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - argparse==1.4.0
      - exceptiongroup==1.2.2
      - importlib-metadata==6.7.0
      - iniconfig==2.0.0
      - llvmlite==0.39.1
      - numpy==1.21.6
      - packaging==24.0
      - pluggy==1.2.0
      - pytest==7.4.4
      - tomli==2.0.1
      - typing-extensions==4.7.1
      - zipp==3.15.0
prefix: /opt/conda/envs/numba

numba/tests/test_types.py::TestSignatures::test_normalize_signature
numba/tests/test_types.py::TestTypes::test_call_notation numba/tests/test_types.py::TestPickling::test_generator numba/tests/test_types.py::TestRecordDtype::test_user_specified numba/tests/test_types.py::TestDType::test_dtype_with_string numba/tests/test_types.py::TestDType::test_dtype_with_type numba/tests/test_types.py::TestDType::test_kind numba/tests/test_types.py::TestDType::test_type_attr
numba/tests/test_types.py::TestTypes::test_array_notation numba/tests/test_types.py::TestTypes::test_array_notation_for_dtype numba/tests/test_types.py::TestTypes::test_cache_trimming numba/tests/test_types.py::TestTypes::test_equality numba/tests/test_types.py::TestTypes::test_interning numba/tests/test_types.py::TestTypes::test_weaktype numba/tests/test_types.py::TestNumbers::test_bitwidth numba/tests/test_types.py::TestNumbers::test_from_bidwidth numba/tests/test_types.py::TestNumbers::test_minval_maxval numba/tests/test_types.py::TestNumbers::test_ordering numba/tests/test_types.py::TestNdIter::test_properties numba/tests/test_types.py::TestPickling::test_arrays numba/tests/test_types.py::TestPickling::test_atomic_types numba/tests/test_types.py::TestPickling::test_enums numba/tests/test_types.py::TestPickling::test_lists numba/tests/test_types.py::TestPickling::test_namedtuples numba/tests/test_types.py::TestPickling::test_optional numba/tests/test_types.py::TestPickling::test_predefined_types numba/tests/test_types.py::TestPickling::test_records numba/tests/test_types.py::TestPickling::test_tuples numba/tests/test_types.py::TestRecordDtype::test_record_type_equiv
numba/sigutils.py
numba/sigutils.py