How to integrate multiple versions of Python with Statistica parallelly?

How to integrate multiple versions of Python with Statistica parallelly?

book

Article ID: KB0079603

calendar_today

Updated On:

Products Versions
Spotfire Statistica 13.0 and higher

Description

Python can be installed and integrated with Statistica, such that user can code and execute Python script within Statistica, for example, via a Python scripting node in Statistica workspace. Multiple versions of Python (e.g. 2.7, 3.5, 3.6) can be integrated with Statistica parallelly. 

Issue/Introduction

How to integrate multiple versions of Python with Statistica parallelly?

Environment

Windows

Resolution

To integrate one version of Python with Statistica:
1. Download and install a specific version of Python (e.g. 2.7) locally in the machine
2. In command prompt, go to the installation folder of that specific version of Python (e.g. C:\Python27\Scripts), and install the Python library package "comtypes" with Python easy_install or pip command. Library "comtypes" is required to integrate Python with Statistica. 
3. Go to Windows System Environmental Path variable, make sure the path to the Python executables is added (e.g. “C:\Python27;C:\Python27\Scripts"), so that Statistica can detect Python installation. For windows 7, the system environmental Path variable can be found from Control Panel\All Control Panel Items\System\Advanced System Settings\Advanced\Environmental variables\System variables\Path. 
With above steps done, Python of that specific version is then integrated with Statistica. 

To integrate another version of Python with Statistica parallelly, e.g. 3.5, user would need to repeat above steps for Python version 3.5. In particular, "comtypes" library has to be installed separately for Python 3.5 and the Python installation path for version 3.5 (e.g “C:\Python35;C:\Python35\Scripts") needs to be added to the System environmental Path too. 

User can integrate more than two versions of Python with Statistica side by side by following above instructions for each version. Importantly, user would have to install python package "comtypes" for EACH version of the pythons that user has installed and want to integrate with Statistica parallelly.