0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

事象

下記の環境でPaddleを使おうとすると、Pythonがクラッシュしてしまった。

  • M2 macbook
  • OS Sonoma 14.4
  • Poetry仮想環境
  • Python 3.12.4
  • paddleocr 2.7.3
  • paddlepaddle 2.6.1
$ poetry run python test.py
# Pythonがクラッシュ
[1]    65704 illegal hardware instruction  poetry run python test.py

解消法

色々調べてみても同じ事象が出てこなかったので、Python3.11.4で試してみたら、クラッシュしなくなった。
依存関係のエラーが出た(下記)ので、numpy<2を入れることで動くようになった!

$ poetry run paddleocr

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

$ poetry add "numpy<2"
0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?