Traceback (most recent call last): File "D:\host_system\FlexflowCCD\paddle_main\paddleocr1.py", line 7, in <module> from paddleocr import PaddleOCR File "D:\host_system\FlexflowCCD\paddle_main\paddleocr.py", line 29, in <module> from PaddleOCRlib.tools.infer import predict_system File "D:\host_system\FlexflowCCD\paddle_main\PaddleOCRlib\__init__.py", line 15, in <module> from .paddleocr import * File "D:\host_system\FlexflowCCD\paddle_main\PaddleOCRlib\paddleocr.py", line 29, in <module> from tools.infer import predict_system File "D:\host_system\FlexflowCCD\paddle_main\PaddleOCRlib\tools\infer\predict_system.py", line 31, in <module> import tools.infer.predict_rec as predict_rec File "D:\host_system\FlexflowCCD\paddle_main\PaddleOCRlib\tools\infer\predict_rec.py", line 31, in <module> from ppocr.postprocess import build_post_process File "D:\host_system\FlexflowCCD\paddle_main\ppocr\postprocess\__init__.py", line 30, in <module> from .pg_postprocess import PGPostProcess File "D:\host_system\FlexflowCCD\paddle_main\ppocr\postprocess\pg_postprocess.py", line 25, in <module> from ppocr.utils.e2e_utils.pgnet_pp_utils import PGNet_PostProcess File "D:\host_system\FlexflowCCD\paddle_main\ppocr\utils\e2e_utils\pgnet_pp_utils.py", line 25, in <module> from extract_textpoint_slow import * File "D:\host_system\FlexflowCCD\paddle_main\ppocr\utils\e2e_utils\extract_textpoint_slow.py", line 24, in <module> from skimage.morphology._skeletonize import thin File "D:\Anaconda3\envs\py_opencv\lib\site-packages\skimage\__init__.py", line 122, in <module> from ._shared import geometry File "geometry.pyx", line 1, in init skimage._shared.geometry ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject Process finished with exit code 1
时间: 2023-07-21 20:00:36 浏览: 195
这个错误是由于numpy版本不兼容导致的。你可以尝试更新numpy版本来解决这个问题。可以使用以下命令来更新numpy:
```
pip install --upgrade numpy
```
如果你使用的是Anaconda环境,可以使用以下命令来更新numpy:
```
conda update numpy
```
更新完numpy之后,再次运行代码应该就不会出现这个错误了。希望这能帮到你!如果还有其他问题,请随时提问。
相关问题
Traceback (most recent call last): File "paddle\fluid\ir.py", line 24, in <module> File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module File "paddle\fluid\proto\pass_desc_pb2.py", line 16, in <module> ModuleNotFoundError: No module named 'framework_pb2' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "main.py", line 1, in <module> File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module File "index.py", line 7, in <module> File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module File "leis\jietuwj.py", line 8, in <module> File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module File "paddleocr\__init__.py", line 14, in <module> File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module File "paddleocr\paddleocr.py", line 21, in <module> File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module File "paddle\__init__.py", line 62, in <module> File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module File "paddle\distributed\__init__.py", line 15, in <module> File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module File "paddle\distributed\spawn.py", line 24, in <module> File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module File "paddle\distributed\utils\launch_utils.py", line 27, in <module> File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module File "paddle\distributed\fleet\__init__.py", line 31, in <module> File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module File "paddle\distributed\fleet\fleet.py", line 33, in <module> File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module File "paddle\fluid\ir.py", line 28, in <module> File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module File "paddle\fluid\proto\pass_desc_pb2.py", line 16, in <module> ModuleNotFoundError: No module named 'framework_pb2' [15508] Failed to execute script 'main' due to unhandled exception!
这是一个 Python 的错误,看起来是在使用 PaddlePaddle 框架时出现了问题。可能是因为缺少某个依赖项或环境配置不正确导致的。你可以尝试更新 PaddlePaddle 和相关的依赖项,或者检查你的环境配置是否正确。如果问题仍然存在,请查看错误信息中的文件和行号,以便更好地定位和解决问题。
D:\python\python.exe D:\code\Production_Practice_GAN-main\Production_Practice_GAN-main\main.py Traceback (most recent call last): File "D:\code\Production_Practice_GAN-main\Production_Practice_GAN-main\main.py", line 1, in <module> from AnimeGAN import AnimeGAN File "D:\code\Production_Practice_GAN-main\Production_Practice_GAN-main\AnimeGAN.py", line 1, in <module> from ops import * File "D:\code\Production_Practice_GAN-main\Production_Practice_GAN-main\ops.py", line 2, in <module> import tensorflow.contrib as tf_contrib ModuleNotFoundError: No module named 'tensorflow.contrib'
这个错误信息显示你的代码在导入 tensorflow.contrib 模块时出现了问题,可能是因为你的 TensorFlow 版本太新或太旧。在 TensorFlow 2.0 中,已经删除了 tensorflow.contrib 模块,如果你的代码是基于 TensorFlow 1.x 编写的,那么建议你使用 TensorFlow 1.x 的版本来运行代码。如果你已经使用了 TensorFlow 1.x 的版本,那么可以尝试安装适当的 TensorFlow 版本或者检查你的代码中是否存在拼写错误或路径问题。
阅读全文