I thought my day today would be easy. There is a FUZZY module that goes with the SPSS integration for Python. All I needed to do was install the SPSS Python Integration technologies, then, maybe install the fuzzy plug in and it would all work.
Both the rocket scientist and I worked on this most of the afternoon, using three different computers, a Mac with SPSS 20, a Windows 7 machine with SPSS 20 and a Mac with SPSS 18. As of now, when we are about to give up temporarily and go out for some well-deserved wine, having already worked through sushi at sunset at Casa del Mar, we haven’t gotten it to work on anything, although we have gotten a whole bunch of interesting different errors.
First, there is FINDING the download for SPSS integration.
Go here and click on the link at the very end of the sentence
I don’t see very well so when the only indication that is the link is a faint color on the last word, it is tough for me, but that’s just me. Okay, I download it. I install it. I am using a Mac so Python is already installed. No problem, right? I open the terminal window and verify that Python 2.5, 2.6 and 2.7 are all installed in usr/lib right where SPSS thinks they should be.
I go to UTILITIES > EXTENSION BUNDLES > VIEW INSTALLED EXTENSION BUNDLES and it gives me the nice little screen below that tells me all of this stuff is installed, including FUZZY.
So, I type in this little program and get the following output. So, in short, it appears that the Python call is working but the module named FUZZY can’t be found.
BEGIN PROGRAM PYTHON.
print “Hello, World!”
BEGIN PROGRAM PYTHON.
Traceback (most recent call last):
File “<string>”, line 2, in <module>
ImportError: No module named FUZZY
I try using both upper case and lower case fuzzy and it doesn’t work either way.
So, I decide to download and install the fuzzy plug in separately and install it. I go to UTILITIES > EXTENSION BUNDLES > INSTALL EXTENSION BUNDLE and get this message that tells me that this extension requires the Integration Plug-In which is not installed even though I installed it, I accepted all the defaults, there were no errors and the (admittedly minor) Python program above appears to run.
I try installing the plug in anyway. The FIRST time when I did this, it seemed to install, SPSS could find the FUZZY module, but nothing ran, as in I got an error on the first word. So, that was when I uninstalled and re-installed the plug-in. It still didn’t work, so I went ahead and tried installing the FUZZY.spe again.
At that point, I get a message saying that components of this extension are already installed.
Hey, I think, maybe I will try it on the Windows 7 machine instead. First, I need to get the rocket scientist to install Python 2.7 in the directory expected by SPSS, because it is not already installed on this machine. He does that while I uninstall and re-install the Python Integration Plug-in for SPSS on the Mac with no better results.
I try installing the Integration Plug-In for Python on the Windows computer, it appears to work and yet when I look under installed extensions, it shows nothing. I try my little test program above, just for the hell of it and it finds neither Python nor the fuzzy module.
I think maybe it is because both copies of SPSS 20 I have are the 14-day trial and maybe it won’t work with that. There is no reason I could think of that it wouldn’t, but maybe not.
So, I try it on my Macbook Pro, running SPSS 18 which is an honest-to-God paid for license. It doesn’t work on that, either, giving me a message about not finding the spss.pth.
I ask the rocket scientist to take a look at that while I try to get it to work on Lion. (SPSS 18 does not run on Lion, which is why I do not have a real licensed SPSS on my desktop.) He tries the thing men always do when they want to get out of something, asking stupid questions until you give up and decide it would be less trouble to do it yourself. (Men: We women are on to you. We have secret meetings where we compare notes.)
He helpfully suggests,
“Did you try looking up that error on Google?”
“Google? No, never heard of it. How do you spell that? What the fuck do you think I did? I checked that Python was installed, checked the path, read the first six links for this specific error …. “
By the sound of sighing coming from upstairs, I can conclude that it is still not working.
So … for now we are going to go out to dinner, drink wine, talk it over and come back with a plan B. I suspect Plan B will entail him reading through a couple hundred pages of documentation on Python and SPSS while I work on the other project I need to have done by next week.
Actually, I’d like to trade places with him, but unfortunately, that’s not an option.
My take away point so far- getting Python integration plug in installed on anything is a pain in the ass.