Running python in v 21

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Running python in v 21

Florio Arguillas

Hi everyone,

 

I used to be able to successfully run this test code in SPSS, but now it looks like the plug-in is not working or nowhere to be found.

Where can we locate (or how do we install) the plug-in for version 21?

 

Thanks for you guidance.

 

Best regards,

 

Florio

 

 

BEGIN PROGRAM.

import random

NTRIALS = 10000

NPEOPLE = 30

matches = 0

for trial in range(NTRIALS):

taken = {}

for person in range(NPEOPLE):

day = random.randint(0, 365)

if day in taken:

matches += 1

taken[day] = 1

print "The fraction of trials that have matching birthdays is", float(matches)/NTRIALS

n = 2 + 2

print n

END PROGRAM.

 

Error # 6890.  Command name: BEGIN PROGRAM

Configuration file spssdxcfg.ini is invalid.

Execution of this command stops.

Configration file spssdxcfg.ini is invalid because the LIB_NAME is NULL.

 

 

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Running python in v 21

Jon K Peck
The Python plugin/Essentials is now included on the distribution media and as a download from the same site as the Statistics download itself, but it is still a separate install.

HTH,


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621




From:        Florio Orocio Arguillas <[hidden email]>
To:        [hidden email]
Date:        10/11/2012 10:48 AM
Subject:        [SPSSX-L] Running python in v 21
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hi everyone,
 
I used to be able to successfully run this test code in SPSS, but now it looks like the plug-in is not working or nowhere to be found.
Where can we locate (or how do we install) the plug-in for version 21?
 
Thanks for you guidance.
 
Best regards,
 
Florio
 
 
BEGIN PROGRAM.
import random
NTRIALS = 10000
NPEOPLE = 30
matches = 0
for trial in range(NTRIALS):
taken = {}
for person in range(NPEOPLE):
day = random.randint(0, 365)
if day in taken:
matches += 1
taken[day] = 1
print "The fraction of trials that have matching birthdays is", float(matches)/NTRIALS
n = 2 + 2
print n
END PROGRAM.
 
Error # 6890.  Command name: BEGIN PROGRAM
Configuration file spssdxcfg.ini is invalid.
Execution of this command stops.
Configration file spssdxcfg.ini is invalid because the LIB_NAME is NULL.