ImportError: cannot import name 'circle' from 'skimage.draw' (C:\Users\Karl Chang\anaconda3\lib\site-packages\skimage\draw\__init__.py)
时间: 2023-08-16 18:06:19 浏览: 150
根据引用[1]和引用[2]的信息,你遇到的报错是因为在导入SVOInfo时出现了错误。根据你的描述,问题可能出在(D:\Develop_Tool\Anaconda\lib\site-packages\utils\__init__.py)文件中,因为该文件是空的,所以无法导入SVOInfo。你通过复制了百度AI Studio上的相关代码到该文件中,解决了这个问题。
对于你提到的新的报错,根据引用[3]的信息,报错信息指出无法从'skimage.draw'中导入'circle'。这可能是因为你的安装环境中缺少了'skimage.draw'模块中的'circle'函数。你可以尝试通过安装或更新'scikit-image'库来解决这个问题。你可以使用以下命令来安装或更新'scikit-image'库:
```
pip install -U scikit-image
```
如果你已经安装了'scikit-image'库,你可以尝试卸载并重新安装它,以确保库的完整性。你可以使用以下命令来卸载和重新安装'scikit-image'库:
```
pip uninstall scikit-image
pip install scikit-image
```
请注意,这些命令需要在命令行或终端中执行,并确保你的环境中已经安装了pip。
希望这些信息对你有帮助,如果还有其他问题,请随时提问。
相关问题
ImportError: cannot import name 'compare_ssim' from 'skimage.measure' (D:\Anaconda3\lib\site-packages\skimage\measure\__init__.py)
This error occurs when the 'compare_ssim' function from the 'skimage.measure' module cannot be imported. This may be due to several reasons, including:
1. Incorrect installation of the 'scikit-image' library.
2. The 'compare_ssim' function is not available in the version of scikit-image that you have installed.
3. There may be issues with the path of the module or package.
To resolve this error, you can try the following solutions:
1. Check if you have installed the 'scikit-image' library correctly. You can do this by running 'import skimage' in the Python console. If this command throws an error, then you need to install the library using 'pip install scikit-image'.
2. Check if the 'compare_ssim' function is available in your version of scikit-image. You can check the scikit-image documentation to see if this function is available in your version. If it is not available, you can try upgrading to the latest version of scikit-image.
3. Check if there are any issues with the path of the module or package. You can try uninstalling and reinstalling the 'scikit-image' library to ensure that the path is correct.
If none of the above solutions work, you can try using an alternative library or function for your task.
ImportError: cannot import name 'compare_psnr' from 'skimage.measure'
引用\[1\]和\[2\]中提到的错误信息"ImportError: cannot import name 'compare_psnr' from 'skimage.measure'"表示在代码中导入skimage.measure模块的compare_psnr函数时出现了错误。这个错误可能是因为skimage库的版本问题导致的。在较新的版本中,compare_psnr函数可能已经被移除或更改了名称。
解决这个问题的方法是检查你所使用的skimage库的版本,并查看官方文档或者其他资源,确认是否有关于compare_psnr函数的更改或替代函数的信息。如果有,你可以根据文档中的指导进行相应的修改。
另外,引用\[3\]中提到的博客文章也提到了相同的错误信息。你可以参考该博客中的解决方案,看看是否适用于你的情况。
总结来说,这个错误是由于导入skimage.measure模块的compare_psnr函数时出现了问题,可能是因为库的版本不兼容或函数名称更改导致的。你可以通过查看官方文档或其他资源来解决这个问题。
#### 引用[.reference_title]
- *1* *3* [Skimage包的安装及使用时报错ImportError: cannot import name ‘compare_psnr’ from ‘skimage.measure’](https://blog.csdn.net/m0_47516549/article/details/126199563)[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^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [python debug:cannot import name ‘compare_psnr‘& cannot import name ‘compare_ssim](https://blog.csdn.net/qq_41554005/article/details/114379788)[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^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]