Hello
I have a question about using python library in the algorithm of Splunk ML Toolkit.
Open the ARIMA.py file in the path splunk/etc/apps/Splunk_ML_Toolkit/bin/algos as below.
=== Contents ===
[root@master algos]# pwd
/opt/splunk/etc/apps/Splunk_ML_Toolkit/bin/algos
[root@master algos]#
[root@master algos]# more ARIMA.py
#!/usr/bin/env python
import datetime
import pandas as pd
import numpy as np
from statsmodels.tsa.arima.model import ARIMA as _ARIMA
from statsmodels.tools.sm_exceptions import MissingDataError
=========================
Among the contents of ARIMA.py , it says import pandas aspd
Where is Pandas bringing up the library in?
When I run ARIMA.py as below, I get a message that the module is not found.
=== Execution Results ===
[root@master algos]# python3 ARIMA.py
Traceback (most recent call last):
File "ARIMA.py", line 5, in <module>
import pandas as pd
ModuleNotFoundError: No module named 'pandas'
[root@master algos]#
Hi @KwonTaeHoon
Have you installed the Python for Scientific Computing (PSC) app from Splunkbase? This is a pre-req for MLTK (see https://docs.splunk.com/Documentation/MLApp/5.5.0/User/Installandconfigure)
The pandas library is within the PSC app at: (Splunk_SA_Scientific_Python_linux_x86_64)/bin/linux_x86_64/4_2_2/lib/python3.9/site-packages/pandas
This is assuming you are running the latest PSC app on linux_x86_64.
Please let me know how you get on and consider upvoting/karma this answer if it has helped.
Regards
Will
Hi livehybrid
The PSC is already installed.
Path : /opt/splunk/etc/apps/Splunk_SA_Scientific_Python_linux_x86_64/bin/linux_x86_64/4_2_2/lib/python3.9/site-packages/pandas
What I'm curious about is
Why does the Pandas error occur when I run ARIMA.py in the /opt/splunk/etc/apps/Splunk_ML_Toolkit/bin/algos path as below?
[root@master algos]# python3 ARIMA.py
Traceback (most recent call last):
File "ARIMA.py", line 5, in <module>
import pandas as pd
ModuleNotFoundError: No module named 'pandas'