libtcod/python-tcod

Issue with libtcod importing NDArray from numpy.typing when it should just be importing ndarray from numpy.

deeredman1991 opened this issue · 3 comments

libtcod tries to do

from numpy.typing import NDArray

and I believe what it's meaning to do is

from numpy import ndarray

as a result it causes an error and crashes on import.

I attached an image of my CLI

Untitled

As you can see from the CLI; I ran pip install tcod and I am using python 3.7.6 on windows.

The issue is more that the requirements are too old. numpy.typing.NDArray is a Numpy 1.21 feature and is not the same as numpy.ndarray. You should upgrade your Numpy installation.

NumPy dropped support of Python 3.7. So the latest versions require Python 3.8 or later. You should still be able to get NumPy 1.21.x which is what the CI tests have been apparently using.

That did it! Thank you very much!