Symbol not found when using pycall to call sklearn in Ruby

问题内容:

I try to call sklearn using ruby, for this I use PyCall such that:

require 'pycall/import'
include PyCall::Import

pyfrom :sklearn, import: :datasets

However, using this last line I have this error (for Python I use anaconda):

/usr/local/lib/ruby/gems/2.4.0/gems/pycall-1.0.3/lib/pycall/import.rb:46:in `import_module’: : dlopen(/Users/tay/anaconda3/lib/python3.6/site-packages/scipy/sparse/linalg/isolve/_iterative.cpython-36m-darwin.so, 2): Symbol not found: _main (PyCall::PyError)

Why is this happening, and how can I fix it?

问题评论:

原文地址:

https://stackoverflow.com/questions/47755866/symbol-not-found-when-using-pycall-to-call-sklearn-in-ruby

添加评论