PaddlePaddle / Paddle

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

cannot import properly on windows with python3.10 #68620

Open jianlins opened 1 month ago

jianlins commented 1 month ago

🔎 Search before asking

🐛 Bug (问题描述)

When using: from paddleocr import PaddleOCR Get the following error: lib\site-packages\paddle\base\core.py:375 366 if has_paddle_dy_lib: 367 sys.stderr.write( 368 'Error: Can not import paddle core while this file exists: ' 369 + current_path (...) 373 + '\n' 374 ) --> 375 if not avx_supported() and libpaddle.is_compiled_with_avx(): 376 sys.stderr.write( 377 "Error: Your machine doesn't support AVX, but the installed PaddlePaddle is avx core, " 378 "you should reinstall paddlepaddle with no-avx core.\n" 379 ) 380 raise e

NameError: name 'libpaddle' is not defined

🏃‍♂️ Environment (运行环境)

on windows 11 arm, not sure if other windows have the same issue. conda create --name testocr python=3.10 pip pip install paddlepaddle paddleocr

🌰 Minimal Reproducible Example (最小可复现问题的Demo)

python -c "from paddleocr import PaddleOCR;"

wangna11BD commented 1 month ago

你的paddle未成功安装,windows安装paddle需要avx的包,你的机器不支持avx,可以运行paddle.utils.run_check() 确认paddle未成功安装。

jianlins commented 1 month ago

There is no avx here: https://github.com/PaddlePaddle/Paddle/blob/develop/python/requirements.txt Is this package I should try to install ? https://pypi.org/project/avx/ But this is likely a python2 package.

xuxinyi389 commented 1 month ago

arm 架构不支持 avx指令集,你在历史编译产物里找到如下链接,你可以安装Python3.8后使用: https://paddle-wheel.bj.bcebos.com/2.4.2/windows/windows-cpu-noavx-mkl-vs2017/paddlepaddle-2.4.2-cp38-cp38-win_amd64.whl