This error is occurring because the cnocr package is unable to import the ConvBNActivation class from the torchvision.models.mobilenetv2 module. This can happen if there is an issue with the installation of the torchvision package or if there are version compatibility issues between the cnocr and torchvision packages.

To fix this error, you can try the following steps:

  1. Check if the torchvision package is installed correctly. You can do this by running pip list in your terminal and looking for torchvision in the list of installed packages. If it is not installed, you can install it by running pip install torchvision.

  2. Check if there are any version compatibility issues between the cnocr and torchvision packages. You can do this by checking the version requirements of cnocr and torchvision in their respective documentation. If there are version compatibility issues, you can try upgrading or downgrading one or both packages to a compatible version.

  3. If the above steps do not work, you can try uninstalling and reinstalling both the cnocr and torchvision packages to ensure a clean installation.

Once you have resolved the issue with the torchvision.models.mobilenetv2 module, the cnocr package should be able to import the ConvBNActivation class and the error should be resolved.

DpythonProjectvenvScriptspythonexe DpythonProjectOCR-PRJocr-remotepy Traceback most recent call last File DpythonProjectOCR-PRJocr-remotepy line 1 in module from cnocr import CnOcr File DpythonPr

原文地址: https://www.cveoy.top/t/topic/7xp 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录