DATA Step, Macro, Functions and more

Access Python in SAS

Posts: 40

Access Python in SAS

[ Edited ]

Hi. I would like to ask. How to access python in sas ?

could we use python in SAS on Demands


thanks in advance

Super User
Super User
Posts: 9,840

Re: pyhton

You can't use Python directly in a SAS program as such, SAS does not have a Python interpreter as part of it.  You can certainly call Python code, via use of the command line like any other command line programs.  SAS OnDemand however is a cloud based system for education purposes, not for a working environment, so no, I don't expect it could drive any Python code, nor why such a thing would be in "training" software.

Frequent Contributor
Posts: 92

Re: pyhton

There is a way but it needs to be set up properly:

Community Manager
Posts: 3,462

Re: Access Python in SAS

You cannot use Python in SAS OnDemand for Academics, but you can use it -- via a Jupyter Notebook -- in SAS University Edition.  See this blog post for details.  Excerpt:

With the December 2017 update, SAS University Edition now includes the SASPy package, available in its Jupyter Notebook interface. If you're keeping track, you know that SAS University Edition has long had support for Jupyter Notebook. With that, you can write and run SAS programs in a notebook-style environment. But until now, you could not use that Jupyter Notebook to run Python programs. With the latest update, you can -- and you can use the SASPy library to drive SAS features like a Python coder.

Ask a Question
Discussion stats
  • 3 replies
  • 4 in conversation