All Apps and Add-ons

importing python not working

giatuanh
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

kiril123
Path Finder

Same problem here. Has anyone managed to solve it?

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...