Hi,
I run into problems when trying to run the example code from:
What I did:
import Pkg
ENV["PYTHON"]=""
Pkg.build("PyCall")
Restarted the Julia CLI, then:
import Pkg
Pkg.add("Conda")
using Conda
Conda.runconda(`update -y conda`)
Conda.add("pandas")
Conda.add("prophet")
and
julia> using Conda
julia> using PyCall
julia> pd = pyimport("pandas")
PyObject <module 'pandas' from '/home/ftournier/.julia/conda/3/x86_64/lib/python3.12/site-packages/pandas/__init__.py'>
julia> pro = pyimport("prophet")
Importing matplotlib failed. Plotting will not work.
Importing plotly failed. Interactive plots will not work.
PyObject <module 'prophet' from '/home/ftournier/.julia/conda/3/x86_64/lib/python3.12/site-packages/prophet/__init__.py'>
julia> m = pro.Prophet()
PyObject <prophet.forecaster.Prophet object at 0x7fd6beece6f0>
julia> df = pd.read_csv("https://raw.githubusercontent.com/facebook/prophet/main/examples/example_wp_log_peyton_manning.csv")
PyObject ds y
0 2007-12-10 9.590761
1 2007-12-11 8.519590
2 2007-12-12 8.183677
3 2007-12-13 8.072467
4 2007-12-14 7.893572
... ... ...
2900 2016-01-16 7.817223
2901 2016-01-17 9.273878
2902 2016-01-18 10.333775
2903 2016-01-19 9.125871
2904 2016-01-20 8.891374
[2905 rows x 2 columns]
Next step failed:
julia> m.fit(df)
14:55:24 - cmdstanpy - INFO - Chain [1] start processing
14:55:24 - cmdstanpy - INFO - Chain [1] done processing
14:55:24 - cmdstanpy - ERROR - Chain [1] error: error during processing Operation not permitted
Optimization terminated abnormally. Falling back to Newton.
14:55:24 - cmdstanpy - INFO - Chain [1] start processing
14:55:24 - cmdstanpy - INFO - Chain [1] done processing
14:55:24 - cmdstanpy - ERROR - Chain [1] error: error during processing Operation not permitted
ERROR: PyError ($(Expr(:escape, :(ccall(#= /home/jska/.julia/packages/PyCall/1gn3u/src/pyfncall.jl:43 =# @pysym(:PyObject_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, pyargsptr, kw)))))
[15267] signal 11 (1): Segmentation fault
in expression starting at none:0
PyErr_CheckSignals at /usr/local/src/conda/python-3.12.11/Modules/signalmodule.c:1771 [inlined]
PyObject_Repr at /usr/local/src/conda/python-3.12.11/Objects/object.c:544
pystring at /home/jska/.julia/packages/PyCall/1gn3u/src/PyCall.jl:243
show at /home/jska/.julia/packages/PyCall/1gn3u/src/exception.jl:39
showerror at ./errorshow.jl:30 [inlined]
#showerror#1026 at ./errorshow.jl:97
showerror at ./errorshow.jl:95
unknown function (ip: 0x7f6b381018a2)
show_exception_stack at ./errorshow.jl:996
display_error at ./client.jl:117
jfptr_display_error_11782.1 at /opt/jska-tmp/julia-1.11.6/share/julia/compiled/v1.11/REPL/u0gqU_QBeOa.so (unknown line)
jl_apply at /cache/build/tester-amdci4-12/julialang/julia-release-1-dot-11/src/julia.h:2157 [inlined]
jl_f__call_latest at /cache/build/tester-amdci4-12/julialang/julia-release-1-dot-11/src/builtins.c:875
#invokelatest#2 at ./essentials.jl:1055 [inlined]
invokelatest at ./essentials.jl:1052 [inlined]
repl_display_error at /cache/build/tester-amdci4-12/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:414
print_response at /cache/build/tester-amdci4-12/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:431
#70 at /cache/build/tester-amdci4-12/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:405
jfptr_YY.70_10215.1 at /opt/jska-tmp/julia-1.11.6/share/julia/compiled/v1.11/REPL/u0gqU_QBeOa.so (unknown line)
with_repl_linfo at /cache/build/tester-amdci4-12/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:678
jfptr_with_repl_linfo_10303.1 at /opt/jska-tmp/julia-1.11.6/share/julia/compiled/v1.11/REPL/u0gqU_QBeOa.so (unknown line)
print_response at /cache/build/tester-amdci4-12/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:403
do_respond at /cache/build/tester-amdci4-12/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:1037
jfptr_do_respond_10366.1 at /opt/jska-tmp/julia-1.11.6/share/julia/compiled/v1.11/REPL/u0gqU_QBeOa.so (unknown line)
jl_apply at /cache/build/tester-amdci4-12/julialang/julia-release-1-dot-11/src/julia.h:2157 [inlined]
jl_f__call_latest at /cache/build/tester-amdci4-12/julialang/julia-release-1-dot-11/src/builtins.c:875
#invokelatest#2 at ./essentials.jl:1055 [inlined]
invokelatest at ./essentials.jl:1052 [inlined]
#126 at /cache/build/tester-amdci4-12/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/REPL.jl:1444
jl_apply at /cache/build/tester-amdci4-12/julialang/julia-release-1-dot-11/src/julia.h:2157 [inlined]
jl_f__call_latest at /cache/build/tester-amdci4-12/julialang/julia-release-1-dot-11/src/builtins.c:875
#invokelatest#2 at ./essentials.jl:1055 [inlined]
invokelatest at ./essentials.jl:1052 [inlined]
#30 at /cache/build/tester-amdci4-12/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:1711
jfptr_YY.30_8323.1 at /opt/jska-tmp/julia-1.11.6/share/julia/compiled/v1.11/REPL/u0gqU_QBeOa.so (unknown line)
macro expansion at /cache/build/tester-amdci4-12/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2861 [inlined]
macro expansion at ./lock.jl:273 [inlined]
#282 at /cache/build/tester-amdci4-12/julialang/julia-release-1-dot-11/usr/share/julia/stdlib/v1.11/REPL/src/LineEdit.jl:2851
jfptr_YY.282_8870.1 at /opt/jska-tmp/julia-1.11.6/share/julia/compiled/v1.11/REPL/u0gqU_QBeOa.so (unknown line)
jl_apply at /cache/build/tester-amdci4-12/julialang/julia-release-1-dot-11/src/julia.h:2157 [inlined]
start_task at /cache/build/tester-amdci4-12/julialang/julia-release-1-dot-11/src/task.c:1202
Allocations: 1056136 (Pool: 1055206; Big: 930); GC: 2
Segmentation fault
I’m not familiar with using Python under Julia so I may have done something wrong.