|
Dear all,
I launched the SPSS_Statistics_PythonEssentials_20002_win64 installation files in order to install Python in my SPSS 20.
The installation ended without any warning.
Then I tried this simple code from the pdf guide:
DATA LIST FREE /var1.
BEGIN DATA
1
END DATA.
DATASET NAME File1.
BEGIN PROGRAM PYTHON.
import spss
File1N=spss.GetVariableCount()
END PROGRAM.
DATA LIST FREE /var1 var2 var3.
BEGIN DATA
1 2 3
END DATA.
DATASET NAME File2.
BEGIN PROGRAM PYTHON.
File2N=spss.GetVariableCount()
if File2N > File1N:
message="File2 has more variables than File1."
elif File1N > File2N:
message="File1 has more variables than File2."
else:
message="Both files have the same number of variables."
print message
END PROGRAM.
In the log I see this:
BEGIN PROGRAM PYTHON.
166 0 M> BEGIN PROGRAM PYTHON.
import spss
File1N=spss.GetVariableCount()
END PROGRAM.
Error # 6886. Command name: BEGIN PROGRAM
The External Program could not be loaded.
Execution of this command stops.
Load library from InvokePython failed.
Do you know how I could fix the problem?
Thanks
|