報錯時,考慮“版本命名一致性”

Nolca發表於2024-09-05

安裝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

相關文章