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!

Improve Data Pipelines Using Splunk Data Management

  Register Now   This Tech Talk will explore the pipeline management offerings Edge Processor and Ingest ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

Register Join this Tech Talk to learn how unique features like Service Centric Views, Tag Spotlight, and ...

Thank You for Celebrating CX Day with Splunk!

Yesterday the entire team at Splunk + Cisco joined the global celebration of CX Day - celebrating our ...