module 'numpy' has no attribute 'object'
时间: 2023-09-02 11:08:25 浏览: 149
python报错: list object has no attribute shape的解决
出现这个问题的原因是,从numpy1.24起删除了numpy.bool、numpy.int、numpy.float、numpy.complex、numpy.object、numpy.str、numpy.long、numpy.unicode类型的支持。解决这个问题可以采取两种方法。
方法一是修改numpy版本。可以通过卸载当前版本的numpy,然后安装之前的版本,比如1.23.5。可以使用以下命令来安装之前的版本:pip uninstall numpy,然后pip install numpy==1.23.5。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [AttributeError: module ‘numpy‘ has no attribute ‘float](https://blog.csdn.net/qq_51511878/article/details/129811061)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *3* [AttributeError: module ‘numpy‘ has no attribute ‘object](https://blog.csdn.net/AliceH1226/article/details/128821182)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文