|
Hi Everyone,
I am trying to start to use Python with SPSS, more specifically, the modules we can download from the website. I believe I have the Python programmability extension installed correctly and have also put the appropriate files in the right spot. For example, I am trying to use the Create Dummies module but I have gotten the same error with other modules. I went through the command dialog box and pasted the syntax, and the error I get revolves around the command name SPSSINC and it not being recognized as a valid command name. I have the appropriate .py file in the my sitepackages folder of my Python 25 installation (I have 17). This probably has been asked a million times, or is something very easy, so I apologize, but I did a search and couldn't find any old posts based on my search criteria. Thanks, Brock ===================== 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 |
|
If you get a message like SPSSINC is not a valid command name, it means that the xml file that defines the command syntax was not read when SPSS started. It's not a Python issue, in fact, but a potential problem with any extension command.
The rule is that the xml file included in the downloaded package must be placed in the extensions subdirectory of the SPSS installation. Now on some systems, you might not have permission to write to that directory. Vista is particularly nasty about that and diverts file copies in some cases to some other location. If you want to use another directory for these files, you need to define an environment variable named SPSS_EXTENSIONS_PATH whose value is the name of the directory you want to use (or a list of directories). Mine, for example, says c:\extcommon Microsoft makes it a little difficult to find where to define such variables. On XP, at least, it's Control Panel System Advanced Environment Variables But the problem most people have is that they didn't copy the xml file to the ordinary extensions directory, so that's the place to start. HTH, Jon Peck -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Brock Sent: Wednesday, June 10, 2009 8:39 PM To: [hidden email] Subject: [SPSSX-L] Python Newbie Hi Everyone, I am trying to start to use Python with SPSS, more specifically, the modules we can download from the website. I believe I have the Python programmability extension installed correctly and have also put the appropriate files in the right spot. For example, I am trying to use the Create Dummies module but I have gotten the same error with other modules. I went through the command dialog box and pasted the syntax, and the error I get revolves around the command name SPSSINC and it not being recognized as a valid command name. I have the appropriate .py file in the my sitepackages folder of my Python 25 installation (I have 17). This probably has been asked a million times, or is something very easy, so I apologize, but I did a search and couldn't find any old posts based on my search criteria. Thanks, Brock ===================== 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 |
|
In reply to this post by Brock-15
Thanks Jon! All I didn't do was put the XML file directly into the
extensions folder. When I unzipped the files, I put them in their own directory inside the extensions. Many thanks, Brock ===================== 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 |
| Free forum by Nabble | Edit this page |
