Jump to content
We've recently updated our Privacy Statement, available here. ×

Data functions using specific python.exe in Spotfire 10.7


Brian Emmerson

Recommended Posts

I am having trouble using a specific python executable for use in a Python data function (Spotfire 10.7). Error messages referenced below. It looks like an issue with referencing Spotfire-related modules in the data function call, and that these modules are not available to the executable I specify.

I want to be able to point to a specific executable for new, localfunctionality development and don't (yet) want to deploy SPKs to a server when working in the testing phase. The python I have developed runs fine against the environment from within either an IDE or a Jupyter environment. I have problems when running the same script within a data function.

I manage my local python installations using anaconda, and would like to be able to use those installations from within Spotfire. Do I need to add specific Spotfire modules to my conda environment associated with the specified executable How do I do this

Please could you provide step-by-step instructions for configuring a specific python executable for use in Python data functions (Spotfire version 10.7 onwards)

 

Errors:

Could not execute function call 'tmp'

 

C:Usersmy_user_nameAppDataLocalContinuumanaconda3envstemplibsite-packagesnumpy__init__.py:140: UserWarning: mkl-service package failed to import, therefore Intel® MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service

from . import _distributor_init

Traceback (most recent call last):

File "(init script)", line 4, in

import spotfire.data_function as dfn

File "C:Usersmy_user_nameAppDataLocalTIBCOSpotfire Cloud10.6.0ModulesCore_43.0.14306.3950pythonspotfire.zipspotfire__init__.py", line 5, in

File "C:Usersmy_user_nameAppDataLocalContinuumanaconda3envstemplibsite-packagespandas__init__.py", line 17, in

"Unable to import required dependencies:n" + "n".join(missing_dependencies)

ImportError: Unable to import required dependencies:

numpy:

 

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

 

Importing the numpy c-extensions failed.

- Try uninstalling and reinstalling numpy.

- If you have already done that, then:

1. Check that you expected to use Python3.7 from "C:Usersmy_user_nameAppDataLocalContinuumanaconda3envstemppython.exe",

and that you have no directories in your PATH or PYTHONPATH that can

interfere with the Python and numpy version "1.18.1" you're trying to use.

2. If (1) looks fine, you can open a new issue at

https://github.com/numpy/numpy/issues. Please include details on:

- how you installed Python

- how you installed numpy

- your operating system

- whether or not you have multiple versions of Python installed

- if you built from source, your compiler versions and ideally a build log

 

- If you're working with a numpy git repository, try `git clean -xdf`

(removes all files not under version control) and rebuild numpy.

 

Note: this error has many possible causes, so please don't comment on

an existing issue about this - open a new one instead.

 

Original error was: DLL load failed: The specified module could not be found.

 

 

 

at Spotfire.Dxp.Data.DataFunctions.Executors.LocalPythonFunctionClient.d__8.MoveNext()

at Spotfire.Dxp.Data.DataFunctions.Executors.PythonScriptExecutor.d__9.MoveNext()

at Spotfire.Dxp.Data.DataFunctions.DataFunctionExecutorService.d__7.MoveNext()

Link to comment
Share on other sites

Thanks for your reply.  That is what I have altered: I have entered a path to my conda environment in the 'use specific python.exe' box.  If I point to the default executable, a script will run just fine.  If I point Spotfire to my conda environment of choice, I get the error message I posted.

 

[i want to point to a specific executable to allow me to use python module functionalty that I can manage through conda]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...