How do I get started with PROC PYTHON on MacOS?
To use PROC PYTHON you will need access to a Python installation on your Mac. Altair SLC supports Python 3.5 onwards. Please use a currently supported version of Python - see 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 before starting SLC, or 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 "/Library/Frameworks/Python.framework/Resources";
at the top of your source code.
Altair SLC takes the value of PYTHONHOME and looks for certain .dylib files in that directory. For example, Python 3.5 provides libpython3.dylib and libpython3.5.dylib. 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)/python35.dylib";
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)/site-packages";