Python Essentials will not run in SPSS v. 21

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

Python Essentials will not run in SPSS v. 21

TerryConway
Hi Jon,

I am using SPSS v.21 and have tried to follow every tip I could find on the internet to get Python Essentials to run so that I can mean-center a lot of variables. I can see "Mean Center Variables" under SPSS Utilities, but I always get the following error:

>Error # 6895.  Command name: begin program
>The Integration Plug-in for Python is configured to work with a different
>version of SPSS Statistics.  Please adjust the spss.pth and SpssClient.pth
>files so that the first line in each file specifies this version of SPSS
>Statistics.  SpssClient.pth and spss.pth are located in the Python
>site-packages directory.
>Execution of this command stops.

I have located those 2 files and have modified the first lines to have various versions of 210, 21.0, 21.0.,21.0.0.0 but nothing I have done has changed the error I get (always the above).

Any advice you have that would help me be able to use Python Essentials would be greatly appreciated.

Thank you.
Terry
Reply | Threaded
Open this post in threaded view
|

Re: Python Essentials will not run in SPSS v. 21

peter link
Kind of a shot in the dark - make sure you are using the correct version of
Python (v2.7; I think v.2.7.2 is recommended) with SPSS v21.

peter

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
TerryConway
Sent: Sunday, August 16, 2015 4:05 PM
To: [hidden email]
Subject: [SPSSX-L] Python Essentials will not run in SPSS v. 21

Hi Jon,

I am using SPSS v.21 and have tried to follow every tip I could find on the
internet to get Python Essentials to run so that I can mean-center a lot of
variables. I can see "Mean Center Variables" under SPSS Utilities, but I
always get the following error:

>Error # 6895.  Command name: begin program The Integration Plug-in for
>Python is configured to work with a different version of SPSS
>Statistics.  Please adjust the spss.pth and SpssClient.pth files so
>that the first line in each file specifies this version of SPSS
>Statistics.  SpssClient.pth and spss.pth are located in the Python
>site-packages directory.
>Execution of this command stops.

I have located those 2 files and have modified the first lines to have
various versions of 210, 21.0, 21.0.,21.0.0.0 but nothing I have done has
changed the error I get (always the above).

Any advice you have that would help me be able to use Python Essentials
would be greatly appreciated.

Thank you.
Terry



--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Python-Essentials-will-not-run
-in-SPSS-v-21-tp5730441.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command SIGNOFF SPSSX-L For a list of
commands to manage subscriptions, send the command INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Python Essentials will not run in SPSS v. 21

David Marso
Administrator
In reply to this post by TerryConway
This is something which can be done quite easily in regular syntax.
Why bother with python for this?
/* simulate some data */.
MATRIX.
SAVE UNIFORM(10000,1000) /OUTFILE * / VARIABLES x0001 TO x1000.
END MATRIX.

/* If you already have a unique identifier for each record in the file then omit the following line */.
COMPUTE ID=$CASENUM.
VARSTOCASES MAKE x FROM x0001  TO x1000 /INDEX=varname(x).
AGGREGATE OUTFILE * MODE ADDVARIABLES / BREAK Varname /MeanValue=MEAN(x).
COMPUTE x=x-MeanValue.
MATCH FILES / FILE * / DROP MeanValue.
CASESTOVARS ID=ID / INDEX=varname.


TerryConway wrote
Hi Jon,

I am using SPSS v.21 and have tried to follow every tip I could find on the internet to get Python Essentials to run so that I can mean-center a lot of variables. I can see "Mean Center Variables" under SPSS Utilities, but I always get the following error:

>Error # 6895.  Command name: begin program
>The Integration Plug-in for Python is configured to work with a different
>version of SPSS Statistics.  Please adjust the spss.pth and SpssClient.pth
>files so that the first line in each file specifies this version of SPSS
>Statistics.  SpssClient.pth and spss.pth are located in the Python
>site-packages directory.
>Execution of this command stops.

I have located those 2 files and have modified the first lines to have various versions of 210, 21.0, 21.0.,21.0.0.0 but nothing I have done has changed the error I get (always the above).

Any advice you have that would help me be able to use Python Essentials would be greatly appreciated.

Thank you.
Terry
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"