安装paddleocr时报错:
--------------------------------------
C++ Traceback (most recent call last):
--------------------------------------
0 paddle_infer::Predictor::Predictor(paddle::AnalysisConfig const&)
1 std::unique_ptr<paddle::PaddlePredictor, std::default_delete<paddle::PaddlePredictor> > paddle::CreatePaddlePredictor<paddle::AnalysisConfig, (paddle::PaddleEngineKind)2>(paddle::AnalysisConfig const&)
2 paddle::AnalysisPredictor::Init(std::shared_ptr<paddle::framework::Scope> const&, std::shared_ptr<paddle::framework::ProgramDesc> const&)
3 paddle::AnalysisPredictor::PrepareProgram(std::shared_ptr<paddle::framework::ProgramDesc> const&)
4 paddle::AnalysisPredictor::OptimizeInferenceProgram()
5 paddle::inference::analysis::Analyzer::RunAnalysis(paddle::inference::analysis::Argument*)
6 paddle::inference::analysis::IrAnalysisPass::RunImpl(paddle::inference::analysis::Argument*)
7 paddle::inference::analysis::IRPassManager::Apply(std::unique_ptr<paddle::framework::ir::Graph, std::default_delete<paddle::framework::ir::Graph> >)
8 paddle::framework::ir::Pass::Apply(paddle::framework::ir::Graph*) const
9 paddle::framework::ir::SelfAttentionFusePass::ApplyImpl(paddle::framework::ir::Graph*) const
10 paddle::framework::ir::GraphPatternDetector::operator()(paddle::framework::ir::Graph*, std::function<void (std::map<paddle::framework::ir::PDNode*, paddle::framework::ir::Node*, paddle::framework::ir::GraphPatternDetector::PDNodeCompare, std::allocator<std::pair<paddle::framework::ir::PDNode* const, paddle::framework::ir::Node*> > > const&, paddle::framework::ir::Graph*)>)
----------------------
Error Message Summary:
----------------------
FatalError: `Illegal instruction` is detected by the operating system.
[TimeInfo: *** Aborted at 1725533879 (unix time) try "date -d @1725533879" if you are using GNU date ***]
[SignalInfo: *** SIGILL (@0x798d5904913a) received by PID 15008 (TID 0x798d5ff6c740) from PID 1493471546 ***]
很显然,这些报错并没有什么有价值的东西。
解决方法
之前:
λ ocr ~ pip list |grep paddle
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
paddle-bfloat 0.1.7
paddleocr 2.8.1
paddlepaddle 2.6.1
paddlepaddle-gpu 2.5.2.post120
手动安装paddlepaddle==2.5.2
后:
λ ocr ~ pip list |grep paddle
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
paddle-bfloat 0.1.7
paddleocr 2.7.3
paddlepaddle 2.5.2
paddlepaddle-gpu 2.5.2.post120
标签:std,const,ir,paddle,framework,报错,版本,一致性,ptr
From: https://www.cnblogs.com/nolca/p/18399195