{"id":2578,"date":"2012-08-07T02:28:37","date_gmt":"2012-08-07T07:28:37","guid":{"rendered":"http:\/\/www.thejuliagroup.com\/blog\/?p=2578"},"modified":"2012-08-07T02:32:35","modified_gmt":"2012-08-07T07:32:35","slug":"getting-spss-python-integration-to-work-on-the-mac-finally","status":"publish","type":"post","link":"https:\/\/www.thejuliagroup.com\/blog\/getting-spss-python-integration-to-work-on-the-mac-finally\/","title":{"rendered":"Getting SPSS Python Integration to Work on the Mac (FINALLY!)"},"content":{"rendered":"<p><a href=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2012\/08\/bless.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft  wp-image-2579\" style=\"margin: 5px;\" src=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2012\/08\/bless-223x300.jpg\" alt=\"cathedral in Montreal\" width=\"223\" height=\"300\" srcset=\"https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2012\/08\/bless-223x300.jpg 223w, https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2012\/08\/bless.jpg 327w\" sizes=\"auto, (max-width: 223px) 100vw, 223px\" \/><\/a> So, I did it. I finally got the SPSS Python Integration modules to work on the Mac. There should be angels singing and certificates of achievement handed to me personally by at least four of the twelve apostles.<\/p>\n<p>At the very least, I should get a prize.<\/p>\n<p>Almost six months ago, <a href=\"http:\/\/www.thejuliagroup.com\/blog\/?p=2119\">I wrote a post on 1,000 ways not to get SPSS FUZZY to work<\/a>.<\/p>\n<p>Okay, let&#8217;s back up here a few steps &#8230; SPSS for some time now has not really been developing the syntax very much and instead offering the capability for free (not counting the $1,699 cost of SPSS) to extend SPSS with Python or R.<\/p>\n<p>Actually, if you are at a university, you can usually get an SPSS license for almost every product for $250 a year or less (sometimes much, much less depending on the deal your campus has).\u00a0 So you have the pointy-clicky interface and you can extend it with other programming languages as well.<\/p>\n<p>Nice.<\/p>\n<p>Also, SPSS runs native on the Mac which not everything (cough &#8211; SAS &#8211; cough) does.<\/p>\n<p>Most times, doing something on the Mac is quite a bit simpler than doing things on Windows. This is not one of those times.<\/p>\n<p>Here is how to get it to work:<\/p>\n<p>1. Install SPSS &#8211; I happen to be using SPSS 20<\/p>\n<p>2.\u00a0 Download the Python plugin<\/p>\n<p><a href=\"https:\/\/www.ibm.com\/developerworks\/mydeveloperworks\/wikis\/home\/wiki\/We70df3195ec8_4f95_9773_42e448fa9029\/page\/Downloads%20for%20IBM\u00ae%20SPSS\u00ae%20Statistics?lang=en\">Go here and click on the link at the very end of the sentence<br \/>\nThe Essentials and Plugins for IBM SPSS Statistics Version 20 for Python and .NET are available here<\/a>.<\/p>\n<p>3. Install the plugin. It should be pretty obvious. You double-click on the file you downloaded, which is a disk image. It opens up, you double-click on the icon that says IBM Statistics Essentials for Python, click through a few windows &#8211; it assumes your SPSS is installed in the default location<\/p>\n<p>&#8211; \/Applications\/IBM\/SPSS\/Statistics\/20<\/p>\n<p>and so is Python27<\/p>\n<p>\/usr<\/p>\n<p>If you have a Mac, Python was probably installed when you got it and in that location.<\/p>\n<p>4. Now, you try SPSS and\u00a0 go to UTILITIES &gt; EXTENSION BUNDLES &gt; VIEW INSTALLED EXTENSION BUNDLES and it shows you have the modules installed but when you try running a program you get an error message that says there is no such module.<\/p>\n<p>Your problem is that your modules are installed in the wrong place. Even worse, because they are installed in a hidden directory, searching won&#8217;t even find them.<\/p>\n<p>Here is how to find out if this is your problem and how to fix it.<\/p>\n<p>5. Go to where you have SPSS installed, hold down the control key and click. You should see a drop down menu like this. Select SHOW PACKAGE CONTENTS<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2012\/08\/contents.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2580 aligncenter\" src=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2012\/08\/contents.jpg\" alt=\"drop down menu\" width=\"464\" height=\"628\" srcset=\"https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2012\/08\/contents.jpg 464w, https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2012\/08\/contents-221x300.jpg 221w\" sizes=\"auto, (max-width: 464px) 100vw, 464px\" \/><\/a><\/p>\n<p style=\"text-align: left;\">When you open the Contents folder, you&#8217;ll see a bunch of other folders. One of them is named Extensions. When you look at this, you can see right away what the problem is. That extensions folder is empty. That is where your modules are supposed to be. So, where are they?<\/p>\n<p style=\"text-align: left;\"><a href=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2012\/08\/extensions.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2581\" title=\"\" src=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2012\/08\/extensions-300x140.jpg\" alt=\"empty extensions folder\" width=\"300\" height=\"140\" srcset=\"https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2012\/08\/extensions-300x140.jpg 300w, https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2012\/08\/extensions.jpg 619w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>That&#8217;s a very good question. If you search, you won&#8217;t find them.\u00a0 They are in the Library folder at the root. Go look there. I bet I&#8217;m right.<\/p>\n<p style=\"text-align: left;\">To find them, click on your hard drive &#8211; mine is named Alice because I like Alice in Wonderland. You should see folders that say Application, Library, Users and maybe a few others. Click on the Library folder.<\/p>\n<p style=\"text-align: left;\">This was my problem before, I looked in the Library folder and expected to see something named IBM or SPSS and didn&#8217;t find anything. <a href=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2012\/08\/pathtofuzzy.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2582\" title=\"\" src=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2012\/08\/pathtofuzzy.jpg\" alt=\"path to fuzzy module\" width=\"671\" height=\"32\" srcset=\"https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2012\/08\/pathtofuzzy.jpg 671w, https:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2012\/08\/pathtofuzzy-300x14.jpg 300w\" sizes=\"auto, (max-width: 671px) 100vw, 671px\" \/><\/a><\/p>\n<p style=\"text-align: left;\">Open the Application Support Folder<\/p>\n<p style=\"text-align: left;\">Open the folder IBM<\/p>\n<p style=\"text-align: left;\">Open the folder SPSS<\/p>\n<p style=\"text-align: left;\">Open the folder Statistics<\/p>\n<p style=\"text-align: left;\">Open the folder 20<\/p>\n<p style=\"text-align: left;\">NOW &#8230;. you see Extensions<\/p>\n<p style=\"text-align: left;\">Open that folder. Copy everything in it.<\/p>\n<p style=\"text-align: left;\">Go back to the empty Extensions folder in the SPSS Contents folder<\/p>\n<p style=\"text-align: left;\">Paste everything into it.<\/p>\n<p style=\"text-align: left;\">Open SPSS.<\/p>\n<p style=\"text-align: left;\">Everything now works.<\/p>\n<p style=\"text-align: left;\">You&#8217;re welcome.<\/p>\n<p style=\"text-align: left;\">\n","protected":false},"excerpt":{"rendered":"<p>So, I did it. I finally got the SPSS Python Integration modules to work on the Mac. There should be angels singing and certificates of achievement handed to me personally by at least four of the twelve apostles. At the very least, I should get a prize. Almost six months ago, I wrote a post&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9,8],"tags":[],"class_list":["post-2578","post","type-post","status-publish","format-standard","hentry","category-software","category-technology"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/2578","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/comments?post=2578"}],"version-history":[{"count":4,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/2578\/revisions"}],"predecessor-version":[{"id":2585,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/2578\/revisions\/2585"}],"wp:attachment":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/media?parent=2578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/categories?post=2578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/tags?post=2578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}