SPSS Statistics

SPSS Statistics

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

 View Only
  • 1.  Using Python from Conda

    Posted Mon October 17, 2022 10:10 AM
    From SPSS 29 (Subscription) on Windows 10 I try to use Conda (Miniforge) Python. SPSS accepts the path to Python (does it look for python310.dll?). SPSS has Python version 3.10.4, so I made sure Conda has the same version.

    But I get no response from Python, not even any error message. For example these don't generate any output:
    begin program python3 .
    print('Hello World!')
    end program .
    begin program python3 .
    gibberish
    end program .
    What's going on here?

    ------------------------------
    forplan Statistik
    ------------------------------

    #SPSSStatistics


  • 2.  RE: Using Python from Conda

    Posted Mon October 17, 2022 10:26 AM
    I don't have conda on my current system, but I recall having some issues with it on older releases.  That was before SPSS moved to a virtual environment for Python, however.

    There are two possibilities for what is going wrong: it might be that text output from Python is not getting sent to the Viewer, or it might be that the Python connection is not working at all.

    Try running an extension command that is implemented in Python such as Utilities > Define Variable Macro.  I suspect that that will work, which would mean that the problem is with mapping text output to the Viewer.  But that is just a guess.

    --





  • 3.  RE: Using Python from Conda

    Posted Mon October 17, 2022 11:09 AM
    I checked "Define Variable Macro": the dialog shows up, but again there is no output, and no macro is generated. So the Python connection is not working at all. (I also checked "Define Variable Macro" with SPSS's Python to see how it is supposed to work.)

    ------------------------------
    forplan Statistik
    ------------------------------