BookmarkSubscribeRSS Feed
Ullsokk
Pyrite | Level 9

The last few years I have seen several options for integrating pyhton and SAS. These include:

  • Calling SAS from python installed on a local machine or virtual machine, using IOM\SASpy
  • Executing python code from SAS using proc FCMP
  • SWAT to connect to CAS in i VIYA environment
  • Groovy

I have been using some saspy, as well as just using SAS to prep data, and read the sas files into python directly or through csv. But in this case, I have a local python installation. This works well for ad hoc task, as I can be quite self sufficient in installing and managing packages. If we were to use python in production, and not just for ad hoc analysis or visualizations, the setup would have to be different (with python installed on the SAS server, or something to that effect). This could allow for using python in production, running code in batch or on request from an application. But in that case, the end user would not be able to install a python package at their own leisure I would assume. Unless there is some container sollution.  

 

I can't find a good overview of all the options, including how the different setups look on the server side. Roughly I have the impression that we could either go for local python, with flexibility and no good options for running python in a production settting, or installing python on a VIYA server, where someone with server access would have to manage packages and make sure nothing breaks. Am I missing somehting? And do you know any good overview of all these options for integrating python with SAS?

2 REPLIES 2
AnandVyas
Ammonite | Level 13

Hi @Ullsokk 

 

I believe the installation/setup etc would be similar but will have to be done by your site administrator with few changes depending upon the OS (win/lax). It would require some admin privileges to fetch the required dependent packages for successful install.

 

While the developer site gives a brief overview of all the python options with SAS, It doesn't have any specific section with overview of installation on server mostly due to the steps being very similar.

 

For ref. https://developer.sas.com/guides/python.html

SASPy installation with syntax for win/lax - https://sassoftware.github.io/saspy/install.html

 

Hope this helps!

 

sastpw
SAS Employee

saspy can connect to remote (and local) installations of SAS with every access method it has (4 of them). You mentioned that you use IOM with a local install? I assume on a PC? IOM connects to remote workspace servers, which are likely what a production system would use. You can have local python same as you do now. It can also connect to the MVA that is in a Viya deployment using the HTTP access method. That's the Compute Micro Service which allows access to MVA as a Compute server (think Workspace server in SAS 9.4). I'd be happy to talk through any of this with you if that's more productive, to get a better understanding of your constraints and what kind of productions deployment you might be trying to access.

 

Thanks,

Tom

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 930 views
  • 1 like
  • 3 in conversation