Paddle YOLOv8 export error: ImportError: libssl.so.1.1: cannot open shared object file: No such file or directory

6tdlim6h  于 4个月前  发布在  其他
关注(0)|答案(3)|浏览(36)

YOLOv8 paddle export is failing with the latest version of 1.4.1 of x2paddle in Google Colab with:

  • ultralytics 8.0.167
  • paddlepaddle 2.5.1
  • x2paddle 1.4.1

Reproduce

# Install
# pip install ultralytics paddlepaddle x2paddle

# Export
yolo export model=yolov8n.pt format=paddle

Result:

Downloading https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt to 'yolov8n.pt'...
100% 6.23M/6.23M [00:00<00:00, 243MB/s]
Ultralytics YOLOv8.0.167 🚀 Python-3.10.12 torch-2.0.1+cu118 CPU (Intel Xeon 2.20GHz)
YOLOv8n summary (fused): 168 layers, 3151904 parameters, 0 gradients

PyTorch: starting from 'yolov8n.pt' with input shape (1, 3, 640, 640) BCHW and output shape(s) (1, 84, 8400) (6.2 MB)
Error: Can not import paddle core while this file exists: /usr/local/lib/python3.10/dist-packages/paddle/fluid/libpaddle.so
PaddlePaddle: export failure ❌ 0.1s: libssl.so.1.1: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "/usr/local/bin/yolo", line 8, in <module>
    sys.exit(entrypoint())
  File "/usr/local/lib/python3.10/dist-packages/ultralytics/cfg/__init__.py", line 446, in entrypoint
    getattr(model, mode)(**overrides)  # default args from model
  File "/usr/local/lib/python3.10/dist-packages/ultralytics/engine/model.py", line 313, in export
    return Exporter(overrides=args, _callbacks=self.callbacks)(model=self.model)
  File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/ultralytics/engine/exporter.py", line 265, in __call__
    f[10], _ = self.export_paddle()
  File "/usr/local/lib/python3.10/dist-packages/ultralytics/engine/exporter.py", line 119, in outer_func
    raise e
  File "/usr/local/lib/python3.10/dist-packages/ultralytics/engine/exporter.py", line 114, in outer_func
    f, model = inner_func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/ultralytics/engine/exporter.py", line 397, in export_paddle
    import x2paddle  # noqa
  File "/usr/local/lib/python3.10/dist-packages/x2paddle/__init__.py", line 3, in <module>
    from .core.program import PaddleGraph
  File "/usr/local/lib/python3.10/dist-packages/x2paddle/core/program.py", line 18, in <module>
    import paddle
  File "/usr/local/lib/python3.10/dist-packages/paddle/__init__.py", line 31, in <module>
    from .framework import monkey_patch_variable
  File "/usr/local/lib/python3.10/dist-packages/paddle/framework/__init__.py", line 17, in <module>
    from . import random  # noqa: F401
  File "/usr/local/lib/python3.10/dist-packages/paddle/framework/random.py", line 17, in <module>
    from paddle import fluid
  File "/usr/local/lib/python3.10/dist-packages/paddle/fluid/__init__.py", line 36, in <module>
    from . import framework
  File "/usr/local/lib/python3.10/dist-packages/paddle/fluid/framework.py", line 35, in <module>
    from . import core
  File "/usr/local/lib/python3.10/dist-packages/paddle/fluid/core.py", line 356, in <module>
    raise e
  File "/usr/local/lib/python3.10/dist-packages/paddle/fluid/core.py", line 269, in <module>
    from . import libpaddle
ImportError: libssl.so.1.1: cannot open shared object file: No such file or directory

You can run this code in Google Colab here:

https://colab.research.google.com/github/ultralytics/ultralytics/blob/main/examples/tutorial.ipynb

wvmv3b1j

wvmv3b1j1#

Even just importing x2paddle causes this error, so it appears to be unrelated to ultralytics

cs7cruho

cs7cruho2#

It seems the problem happend while import paddle framework. I will transfer this issue to github.com/PaddlePaddle/Paddle

hs1rzwqc

hs1rzwqc3#

looks like the same issue as here: #55597

相关问题