rubypython,这个 gem 在使用的执行的时候官方给的用法是:
RubyPython is fairly easy to start using; there are three phases to its use:
Start the Python interpreter (RubyPython.start).
Import and use Python code (RubyPython.import).
Stop the Python interpreter (RubyPython.stop). 而我在使用的时候出现异常
arg2 = 900
arg1 = 800
arg3 = 1000
@result = Array.new
RubyPython.start
np = RubyPython.import("numpy")
list = np.random.triangular(arg1, arg2, arg3,100000 )
@result = list.to_a
RubyPython.stop
puts @result
出错截图如下:
如果我将 RubyPython.stop 删除前几次执行不会出错,反复执行就会出错,如图:
请问各位这是什么原因?谢谢