You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the pip distribution (at least on windows), in flatbuffers\compat.py, it uses imp, which is removed in python 3.12, so I had to monkey patch it to use importlib instead to make the library work properly.
I couldn't find that code anywhere, so I suppose it is in some pip package source somewhere, otherwise I'd made a PR.
The text was updated successfully, but these errors were encountered:
def import_numpy():
"""
Returns the numpy module if it exists on the system,
otherwise returns None.
"""
try:
imp.find_module('numpy')
numpy_exists = True
except ImportError:
numpy_exists = False
if numpy_exists:
# We do this outside of try/except block in case numpy exists
# but is not installed correctly. We do not want to catch an
# incorrect installation which would manifest as an
# ImportError.
import numpy as np
else:
np = None
return np
Hi!
In the pip distribution (at least on windows), in flatbuffers\compat.py, it uses imp, which is removed in python 3.12, so I had to monkey patch it to use importlib instead to make the library work properly.
I couldn't find that code anywhere, so I suppose it is in some pip package source somewhere, otherwise I'd made a PR.
The text was updated successfully, but these errors were encountered: