All Apps and Add-ons

importing python not working

Engager

I tried to import pandas through various sources...

  1. I pipped and install pandas inside of my 2.7.13, copy and pasted the site-packages over... it doesn't work
  2. I installed the Python Scientific package: https://splunkbase.splunk.com/app/2882/ ... it still doesn't work
  3. I mapped all 3 site-packages inside of my script ... doesn't work

    import sys
    sys.path.append('C:\Program Files\Splunk\Python-2.7\Lib\site-packages')
    sys.path.append('E:\python2.7.13\Lib\site-packages')
    sys.path.append('C:\Program Files\Splunk\etc\apps\Splunk_SA_Scientific_Python_windows_x86_64\bin\windows_x86_64\Lib\site-packages')

Error Message:

03-24-2019 21:16:30.737 -0500 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\search\bin\webscraping.py"" Traceback (most recent call last):
03-24-2019 21:16:30.737 -0500 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\search\bin\webscraping.py"" File "C:\Program Files\Splunk\etc\apps\search\bin\webscraping.py", line 6, in
03-24-2019 21:16:30.737 -0500 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\search\bin\webscraping.py"" import pandas as pd
03-24-2019 21:16:30.737 -0500 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\search\bin\webscraping.py"" File "C:\Program Files\Splunk\Python-2.7\Lib\site-packages\pandas_init.py", line 13, in
03-24-2019 21:16:30.737 -0500 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\search\bin\webscraping.py"" __import
(dependency)
03-24-2019 21:16:30.737 -0500 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\search\bin\webscraping.py"" File "C:\Program Files\Splunk\Python-2.7\Lib\site-packages\numpy__init
.py", line 142, in
03-24-2019 21:16:30.737 -0500 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\search\bin\webscraping.py"" from . import core
03-24-2019 21:16:30.737 -0500 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\search\bin\webscraping.py"" File "C:\Program Files\Splunk\Python-2.7\Lib\site-packages\numpy\core__init
.py", line 23, in
03-24-2019 21:16:30.737 -0500 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\search\bin\webscraping.py"" WinDLL(os.path.abspath(filename))
03-24-2019 21:16:30.737 -0500 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\search\bin\webscraping.py"" File "C:\Program Files\Splunk\Python-2.7\Lib\ctypes__init
.py", line 366, in __init_
03-24-2019 21:16:30.737 -0500 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\search\bin\webscraping.py"" self._handle = _dlopen(self._name, mode)
03-24-2019 21:16:30.737 -0500 ERROR ExecProcessor - message from "python "C:\Program Files\Splunk\etc\apps\search\bin\webscraping.py"" WindowsError: [Error 193] %1 is not a valid Win32 application

Path Finder

Same problem here. Has anyone managed to solve it?

0 Karma
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!