PyMiniRacer icon indicating copy to clipboard operation
PyMiniRacer copied to clipboard

The required file "libmini_racer.dylib" can't be found in mac M1

Open RainStoneLau opened this issue 3 years ago • 18 comments

I am using the macbook M1, and python version is 3.9

Steps to reproduce

When I import a package named akshare which uses the py_mini_racer as a requirement, the error occured as the following:

File "/opt/homebrew/lib/python3.9/site-packages/py_mini_racer/py_mini_racer.py", line 125, in _build_ext_handle raise RuntimeError("Native library not available at {}".format(EXTENSION_PATH)) RuntimeError: Native library not available at /opt/homebrew/lib/python3.9/site-packages/py_mini_racer/libmini_racer.dylib

I checked the file path, and found there is no file named libmini_racer.dylib but a file named libmini_racer.muslc.so.

Expected behavior

The import akshare can be successful

Actual behavior

RuntimeError occured

System configuration

PyMiniRacer version: 0.6.0 Python version: 3.9.5

RainStoneLau avatar May 24 '21 03:05 RainStoneLau

I checked again and found there was no suitable whl installation package for mac M1 using pip.

RainStoneLau avatar May 25 '21 01:05 RainStoneLau

Can you please compile an install package for the arm architecture? Thanks a lot

RainStoneLau avatar May 25 '21 02:05 RainStoneLau

I am using the macbook M1, and python version is 3.9

Steps to reproduce

When I import a package named akshare which uses the py_mini_racer as a requirement, the error occured as the following:

File "/opt/homebrew/lib/python3.9/site-packages/py_mini_racer/py_mini_racer.py", line 125, in _build_ext_handle raise RuntimeError("Native library not available at {}".format(EXTENSION_PATH)) RuntimeError: Native library not available at /opt/homebrew/lib/python3.9/site-packages/py_mini_racer/libmini_racer.dylib

I checked the file path, and found there is no file named libmini_racer.dylib but a file named libmini_racer.muslc.so.

Expected behavior

The import akshare can be successful

Actual behavior

RuntimeError occured

System configuration

PyMiniRacer version: 0.6.0 Python version: 3.9.5

It's a good question and waiting

albertandking avatar Jul 14 '21 06:07 albertandking

Any workarounds?

LennyLip avatar Nov 20 '21 05:11 LennyLip

Howto build v8 on M1 https://joyeecheung.github.io/blog/2021/08/27/binding-v8-on-an-m1-macbook/

LennyLip avatar Nov 20 '21 15:11 LennyLip

Build for Apple M1 fork https://github.com/studyhub-co/PyMiniRacer

My result, you can try to use it: libmini_racer.dylib.zip

LennyLip avatar Nov 20 '21 18:11 LennyLip

Build for Apple M1 fork https://github.com/studyhub-co/PyMiniRacer

My result, you can try to use it: libmini_racer.dylib.zip

Perfect! It works! I just met the problem yesterday and today I see your newest solution here. Thank you so much!

SleeperXZY avatar Nov 21 '21 08:11 SleeperXZY

Build for Apple M1 fork https://github.com/studyhub-co/PyMiniRacer

My result, you can try to use it: libmini_racer.dylib.zip

Thanks for your work!

albertandking avatar Nov 29 '21 08:11 albertandking

Build for Apple M1 fork https://github.com/studyhub-co/PyMiniRacer

My result, you can try to use it: libmini_racer.dylib.zip

Thanks for your work!

alexzlx1900 avatar Dec 19 '21 03:12 alexzlx1900

Found there is a guy using windows met the same question, maybe the missing package is not only for Mac M1

Boyee2022 avatar Jul 07 '22 01:07 Boyee2022

Build for Apple M1 fork https://github.com/studyhub-co/PyMiniRacer

My result, you can try to use it: libmini_racer.dylib.zip

Thank you for your work!! You totally solved my problem!

Eurus-0504 avatar Jul 31 '22 01:07 Eurus-0504

I have the same problem with windows. RuntimeError: Native library not available at D:\Program Files\python\lib\site-packages\py_mini_racer\mini_racer.dll Exception ignored in: <function MiniRacer.del at 0x0BB219C0>

I checked the file path, and found there is no file named mini_racer.dll but a file named libmini_racer.muslc.so.

Is anybody have the file named mini_racer.dll ? thanks.

VIROGER12 avatar Aug 10 '22 07:08 VIROGER12