Reputation: 165
I need to put a certain code developed in Python 3 into a SPSS Modeler node (using the Extension Transform node). This code uses pandas and the default installation of Modeler doesn't include this module.
I tried to make SPSS to point to my own Python installation (which includes pandas module) by modifying the 'options.cfg' file following these instructions:
However, when I try to import pandas inside SPSS Modeler, it isn't able to load the module. In fact I am not able to load pyspark neither by writing:
import spss.pyspark
Also when I try to see the directory of the python executable:
import sys
print sys.executable
SPSS gives back a 'None' value.
How can I get to work pandas in SPSS Modeler? It seems that I am not able to import any module in Modeler. I am a beginner in SPSS so any help would be appreciated.
Upvotes: 5
Views: 1867
Reputation: 310
You can install new packages to your existing SPSS Modeler 18.1 Version by going to your installation path, e.g. "C:\Program Files\IBM\SPSS\Modeler\18.1" and then into the folder python. There you open a windows command shell in admin mode. Now enter
python.exe -m pip install pandas
and it will install the library for SPSS to use.
Upvotes: 4