Skip to content

Ideas to solve failed mesa import - "AttributeError: module 'numpy.typing' has no attribute 'NDArray'" #1826

Answered by rht
AshleighPrice asked this question in Q&A
Discussion options

You must be logged in to vote

numpy.typing.NDArray is a recent addition to NumPy since 1.21: https://numpy.org/doc/stable/reference/typing.html#numpy.typing.NDArray. It's possible that the installed NumPy version bundled in that ArcGIS Pro is older than that. I haven't used that software: is it possible to update the NumPy version manually? If this is not possible, you can also manually edit line 54 of C:\Program Files\ArcGIS\Pro\bin\Python\envs\AgentBasedModel\lib\site-packages\mesa\space.py
to

FloatCoordinate = Any

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@AshleighPrice
Comment options

Answer selected by AshleighPrice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants