PaddlePaddle / Paddle

PArallel Distributed Deep LEarning: Machine Learning Framework from Industrial Practice (『飞桨』核心框架,深度学习&机器学习高性能单机、分布式训练和跨平台部署)
http://www.paddlepaddle.org/
Apache License 2.0
22.09k stars 5.55k forks source link

安装成功,import失败 #50176

Open yilu1015 opened 1 year ago

yilu1015 commented 1 year ago

问题描述 Issue Description

Python 3.10.9上成功安装paddlepaddle 2.41,但import paddle时出现以下错误。疑似是ImageMagick出了问题,用Homebrew重装后仍失败:

(paddle_env) jsmith@Johns-MacBook-Air ~ % import paddle
Version: ImageMagick 7.1.0-60 Q16-HDRI aarch64 20831 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP(5.0) 
Delegates (built-in): bzlib fontconfig freetype gslib heic jng jp2 jpeg jxl lcms lqr ltdl lzma openexr png ps raw tiff webp xml zlib
Compiler: gcc (4.2)

....

import: delegate library support not built-in '' (X11) @ error/import.c/ImportImageCommand/1297.

版本&环境信息 Version & Environment Information


Paddle version: 2.4.1 Paddle With CUDA: False

OS: macOS 13.0.1 GCC version: N/A Clang version: 14.0.0 (clang-1400.0.29.202) CMake version: N/A Libc version: N/A Python version: 3.10.9

CUDA version: N/A cuDNN version: N/A Nvidia driver version: N/A Nvidia driver List: N/A


paddle-bot[bot] commented 1 year ago

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档常见问题历史IssueAI社区来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQGithub Issue and AI community to get the answer.Have a nice day!

ZHUI commented 1 year ago

收到,我们这边排查一下 macOS 13.0.1 的安装问题。

XieYunshen commented 1 year ago

(paddle_env) jsmith@Johns-MacBook-Air ~ % import paddle

这个是没有进入python么?

yilu1015 commented 1 year ago

(paddle_env) jsmith@Johns-MacBook-Air ~ % import paddle

这个是没有进入python么?

啊,太抱歉了。进入之后提示paddlepaddle成功,看到了PaddlePaddle is installed successfully!,但在随后安装paddleocr时又出现了新的问题。

paddlepaddle 2.4.1 requires protobuf<=3.20.0,>=3.1.0, but you have protobuf 3.20.3 which is incompatible.

手动安装 protobuf==3.20.0 后,和onnx的依赖要求又冲突了:

onnx 1.13.0 requires protobuf<4,>=3.20.2, but you have protobuf 4.21.12 which is incompatible.

测试import paddle时,出现了新错误:

(paddle_env) jsmith@Johns-MacBook-Air ~ % python
Python 3.10.9 (main, Jan 11 2023, 09:18:18) [Clang 14.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import paddle
ERROR: flag 'flagfile' was defined more than once (in files '/Users/paddle/xly/workspace/f2bafd01-b80e-4ac8-972c-1652775b2e51/Paddle/build/third_party/gflags/src/extern_gflags/src/gflags.cc' and '/tmp/gflags-20211021-3963-1mi18ai/gflags-2.2.2/src/gflags.cc').

请问何解?麻烦了!