pybroker icon indicating copy to clipboard operation
pybroker copied to clipboard

"Native library not available" error

Open robustness-data opened this issue 1 year ago • 4 comments

Hi there! I tried to run a sample code and got this error: "RuntimeError: Native library not available at ... /Users/usr/opt/anaconda3/envs/pybroker39/lib/python3.9/site-packages/py_mini_racer/libmini_racer.dylib

Anyone had the same issue before?

robustness-data avatar Jun 10 '23 09:06 robustness-data

Which notebook do you see this on?

It looks like libmini_racer is required by AKShare. If you don't plan to use AKShare, then it shouldn't cause a problem.

edtechre avatar Jun 10 '23 17:06 edtechre

Hi there! I tried to run a sample code and got this error: "RuntimeError: Native library not available at ... /Users/usr/opt/anaconda3/envs/pybroker39/lib/python3.9/site-packages/py_mini_racer/libmini_racer.dylib

Anyone had the same issue before?

Hi If you are macOS users it may appear! I will add some docs for it!

albertandking avatar Jun 12 '23 17:06 albertandking

Which notebook do you see this on?

It looks like libmini_racer is required by AKShare. If you don't plan to use AKShare, then it shouldn't cause a problem.

It's a error for macos,I will write a PR for this!

albertandking avatar Jun 12 '23 17:06 albertandking

Hi @albertandking,

Was https://github.com/edtechre/pybroker/pull/42 the fix for this issue?

edtechre avatar Jun 22 '23 03:06 edtechre

@edtechre @albertandking Thank you all for response! I do use MAC OS system to run the sample notebook, and tend to use AKshare. If you could propose a solution that would be really helpful for MAC users. Thanks!

robustness-data avatar Jun 24 '23 06:06 robustness-data

@robustness-data Can you update PyBroker and try again? This may have been fixed with https://github.com/edtechre/pybroker/pull/42

edtechre avatar Jun 24 '23 08:06 edtechre

@edtechre Not fixed. same issue.

vikasgola avatar Jun 24 '23 21:06 vikasgola

@vikasgola This only affects the usage of the AKShare DataSource, correct?

edtechre avatar Jun 24 '23 21:06 edtechre

@vikasgola I have updated PyBroker to move the AKShare DataSource to a separate module. This should now no longer be an issue unless you explicitly import AKShare.

edtechre avatar Jun 24 '23 22:06 edtechre

If you still need to use AKShare, see this issue for details on how to resolve.

edtechre avatar Jun 24 '23 23:06 edtechre

@edtechre @albertandking Thank you all for response! I do use MAC OS system to run the sample notebook, and tend to use AKshare. If you could propose a solution that would be really helpful for MAC users. Thanks!

I apologize for the late response. The official documentation of Akshare has a tutorial on configuring the M-series processors, but it is in Chinese; here, I will briefly introduce how to set it up.

  1. download the lib here: https://jfds-1252952517.cos.ap-chengdu.myqcloud.com/akshare/software/pyminiracer/libmini_racer.dylib
  2. put the lib here: /Users//Library/Python/<python_version>/lib/python/site-packages/py_mini_racer;You can find the specific download path for third-party Python packages on your own machine.

albertandking avatar Jun 25 '23 07:06 albertandking

@vikasgola I have updated PyBroker to move the AKShare DataSource to a separate module. This should now no longer be an issue unless you explicitly import AKShare.

This is a good temporary solution to the problem.

albertandking avatar Jun 25 '23 07:06 albertandking

Thank you all

robustness-data avatar Jul 13 '23 15:07 robustness-data