How to Install Python and PLS for Statistics 21. Unable to run PLS getting error warning #6894

Technote (FAQ)


I have installed IBM SPSS Statistics 21 and SPSS Statistics PythonEssentials 21 but I can't seem to run my PLS command. When I tried to run the below command, I am getting the error warning listed below.

import spss
print "hello world"
Warning # 6894. Command name: BEGIN PROGRAM
The external program exit unexpectedly and lost its content, a new
external program will startup to execute the rest of job.


You are more likely to be getting the error when you don't have all the Python components installed.

Below are the list you do need to have install to make your PLS works.
1. Current version of Python 2.7 if you are using Statistics 20. Python27 can be download from Python site For Statistics 21, PythonEssential21 should automatically installed Python2.7 and PLS for you.
For PythonEssentials 21, you can get it from the Passport Advantage download. It no longer available via DeloperWorks Forum.
2 .Install Nimpy and Scipy latest version that match your Python. This should be available for download through Be sure to choose the correct bit format for your OS.
When running the BEGIN PROGRAM to test your Python or PLS, be sure there is NO space or indentation infront of IMPORT or PRINT command. Otherwise, it will produce a string location error.
After you have all the components listed above installed along with your Statistics version, just run the command in Statistics syntax again. You can also run this PLS command through Analyze/Regression/PLS.

begin program.
import PLS
print "have a nice day"
end program.

Rate this page:

(0 users)Average rating

Add comments

Document information

More support for:

SPSS Statistics

Software version:


Operating system(s):


Reference #:


Modified date:


Translate my page

Machine Translation

Content navigation