我有一个julia函数:
def some_function():
model = RandomForestRegressor(max_depth=10)
.
.
.
return predictions
end
和一个python函数:
def py_function():
predictions = Main.some_function()
return predictions
问题显然被简化了,但这返回了一个错误:
JuliaError: Exception 'ArgumentError: Package RandomForest not found in current path:
- Run `import Pkg; Pkg.add("RandomForest")` to install the RandomForest package.
' occurred while calling julia code:
using RandomForest
我的结论是julia环境没有RandomForest模块。如何从my_file.py级别添加它?
>>> from julia import Pkg
>>> Pkg.add("RandomForest")