How do I get started with PROC PYTHON on Linux/Unix platforms?

Nico Chart_21517
Nico Chart_21517
Altair Employee
edited June 19 in Altair RapidMiner

To use PROC PYTHON you will need access to a Python installation on your Unix machine. Altair SLC supports Python 3.5 onwards. Please use a supported version of Anaconda or Python. https://devguide.python.org/versions/.

You may install Python itself or you may choose to install Anaconda - a larger package that contain Python, R, and more.

There is some documentation in the /doc/en folder of the Altair Analytics Workbench installation called WPS-Python-Procedure-User-Guide.pdf

Also there is a sample program in the /doc/en/samples.tar.gz called 11.0-PythonProcedure.sas that may be useful.

Altair SLC depends on an environmental variable called PYTHONHOME which you can either define in your altairslcenv.sh shell file or at the top of your SAS language program by using the syntax of the form:

options SET=PYTHONHOME "/opt/python35";

Altair SLC takes the value of PYTHONHOME and appends the string /lib/ and looks for certain .so files in that directory. For example, Python 3.5 provides libpython3.so and libpython3.5.so. Please make sure these shared object files exist.

note: in the unlikely event that you need to specifically use a particular .so file then you can set the SLC-specific environment variable:

options SET=PYTHONLIB "%sysget(PYTHONHOME)/lib/python35.so";

PROC PYTHON requires the python packages 'numpy' and 'pandas' to be installed. The environment variable PYTHONPATH may be set to point to one or more 'site packages' locations (separated by semi-colon ":" characters). The default is equivalent to the single location:

options SET=PYTHONPATH "%sysget(PYTHONHOME)/lib/site-packages";

 

Tagged: