BookmarkSubscribeRSS Feed
sastpw
SAS Employee

Hi SAS Developers,

I’m presenting a live “Ask the Expert” webinar on August 24th, 11 AM – Noon ET entitled How Do I Use SASPy to Interface with SAS® From My Python Code? I’ll give you an introduction to SASPy, our open source Python interface to SAS. We’ll explore use cases, resources and capabilities. I’ll also host a live Q&A session at the end of the webinar.

You will learn:

  • How to integrate your existing software systems with the latest open source language to write mixed workflows.
  • How SASPy can open SAS to Python programmers so they can use the best of both worlds, together.
  • A full overview of SASPy, including documentation, support resources, use cases and capabilities. the advanced features of SAS survey procs.

Reserve your spot for the webinar.

 

Want more tips? Be sure to subscribe to the Ask the Expert board to receive follow up Q&A, slides and recordings from this and other SAS Ask the Expert webinars.

 

Can't join the live event? You can view this and other Ask the Expert sessions on-demand here.  

 

SASPy.jpg

2 REPLIES 2
AhmedAl_Attar
Ammonite | Level 13

Hi Tom,

 

Thank you for the Webinar, it was very informative.

I'm having issues with testing/implementing this new Installation/Configuration

Stand-alone SAS 9.4 install On Linux
Client Windows STDIO over SSH!
- SASPy: V3.7.4 - Python: 3.9 (64-bit)

My sascfg_personal.py contains the following settings:

ssh      = {'saspath' : '<SASHomePath>/SASFoundation/9.4/bin/sas_en',
            'ssh'     : 'C:\Windows\System32\OpenSSH\ssh.exe',
            'host'    : 'remote.linux.host', 
            'encoding': 'latin1',
	    'luser'   : '<UserID>',
	    'localhost': '<localHost-IP-Address>',
            'options' : ["-fullstimer"]
            }

When I try to Start a SAS session using

import saspy
sas = saspy.SASsession(cfgname='ssh')

 I can see the SAS session has started on my Remote Linux Box, but then Python gets stuck, and does not give me a prompt to enter any statements after that!!   

 

- Do you have a working configuration (Windows --> Linux) that you can share?

- Are there special Firewall settings you had to enable/define to allow bi-directional communication between the two machines?

 

Any help would be greatly appreciated.

Thanks,

Ahmed

sastpw
SAS Employee

Hey, that configuration definition looks like a plausible config. Do you have passwordless ssh configured? If not, it could be that it's hung waiting for a password to by typed in, which is why it needs passwordles (ssh keys). The other thing could be that if you've never ssh'ed to this host before, that it's not in your known_hosts file, so it's prompting you whether you want this host added or not, and is hung on that prompt. If you look at the process (the ssh process on windows), and try running that same command, with the same parameters, from a command prompt, and add -vvv, maybe you'll see what's going on. It's probably a prompt that's got it hung.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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
  • 1030 views
  • 1 like
  • 2 in conversation