AttributeError: module 'mmcv' has no attribute 'Config'
时间: 2023-09-29 12:11:24 浏览: 281
关于.NET Attribute在数据校验中的应用教程
这个错误是由于最新版本的mmcv模块不再支持Config类导致的。[2为了解决这个问题,你需要安装mmengine模块,并将原先的`import mmcv`改成`import mmengine`。更多详细信息可以参考这个链接:https://github.com/open-mmlab/mmdeploy/issues/1781。此外,你还需要在命令行中输入`export CUDA_HOME=/usr/local/cuda-11.7`命令。
此外,还有一点需要注意的是,关于pytest断言报错的问题,你需要使用pytest运行代码,而不是直接运行assume函数。这样才能避免出现报错。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [AttributeError: module ‘mmcv‘ has no attribute ‘Config](https://blog.csdn.net/weixin_46309234/article/details/131015173)[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^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [Pytest断言报错:AttributeError: module pytest has no attribute assume](https://blog.csdn.net/weixin_51190396/article/details/131665172)[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^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文