SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 

 View Only
Expand all | Collapse all

Problems getting SPSS to recognise python 3.8 so I can enable partial least squares regression function

  • 1.  Problems getting SPSS to recognise python 3.8 so I can enable partial least squares regression function

    Posted Sat December 12, 2020 08:02 PM

    I've followed many many guides today to try to get this working. I've reinstalled two different versions of SPSS (25 and 26!) and have downloaded anaconda3 and miniconda2 so that I have versions outwith those uploaded with spss. I've downloaded the numpy and scipy packages and I still can't get the PLS function to work - I'm just getting an error message saying there may be a problem with the module or syntax error.

    The main identifiable ongoing problem is that when I try to specify an alternative file location for Python 3 it won't register the 3.8 version and just says there's no python 3.4 in the specified folder. I've been unable to download python 3.4 (only an archived file which I can't open properly to install). Please help! this is proving very frustrating......






    #SPSSStatistics
    #Support
    #SupportMigration


  • 2.  RE: Problems getting SPSS to recognise python 3.8 so I can enable partial least squares regression function
    Best Answer

    Posted Sat December 12, 2020 09:28 PM

    If it won't register 3.8, it would be because you are using a Python 2 version. Python 3.4 is supported in V25 and V26 along with Python 2.7. If you have installed PLS within the lifetime of Statistics V27, then the PLS version you got was for Python 3.

    You can install the Python 3.4 Anaconda distribution - look here

    Old package lists — Anaconda documentation

    You need to get the right platform and bitness to match your Statistics version.

    It might be easier to install a registered Python 3.4, point to it in Edit > Options, and then just pip install numpy and scipy.

    This is kind of a mess, and I hope this will get improved in the next version of Statistics. As the original co-author of PLS quite a few years ago, I'm not happy with this. but it is possible to get it to work.






    #SPSSStatistics
    #Support
    #SupportMigration


  • 3.  RE: Problems getting SPSS to recognise python 3.8 so I can enable partial least squares regression function
    Best Answer

    Posted Mon December 14, 2020 06:57 AM

    Thanks very much Jon. I managed to get the 3.4 version of Anaconda and that got it working. Just in case anyone else finds this thread during a search for solutions to similar problems I used this one from the Anaconda archive list (it wasn't immediately obvious to me which one included 3.4 and I ended up with several false starts downloading versions with different python iterations!)

    Anaconda3-2.2.0-Windows-x86_64 did the trick though.


    I'm wondering if I can ask you another question? Is it possible to perform PLS-DA with the SPSS extension? I'm a novice with the technique and have been following a guide written by David Garson but have struggled to find other detailed resources for explaining the procedure and output interpretation in non specialist terms (I'm clinical rather than a maths/stats background so the articles with algebraic explanations tend to lose me along the way...). I usually use the Laerd guides for SPSS but they don't cover many extensions. Thanks again for suggesting the anaconda archive!






    #SPSSStatistics
    #Support
    #SupportMigration


  • 4.  RE: Problems getting SPSS to recognise python 3.8 so I can enable partial least squares regression function
    Best Answer

    Posted Mon December 14, 2020 03:10 PM

    I can't run PLS current on my Windows v 2004 system due to a nasty Microsoft bug in that Windows distribution, (There is a fix from MS for that working its way into the Windows update channel, but it is not expected to appear before sometime in January.)

    However, if your dependent variable has a categorical measurement level, PLS will take that into account.






    #SPSSStatistics
    #Support
    #SupportMigration