问题描述
跑代码(pyCUDA,pyTensorRT相关)的时候numpy报错
File ~\anaconda3\envs\myenv\lib\site-packages\numpy_init_.py:284, in getattr(attr)
281 from .testing import Tester
282 return Tester
–> 284 raise AttributeError("module {!r} has no attribute "
285 “{!r}”.format(name, attr))
AttributeError: module ‘numpy’ has no attribute ‘bool’
解决方案
把numpy从1.22.x升级到1.23.1
python -m pip uninstall numpy python -m pip install numpy==1.23.1
解决方案来源