BookmarkSubscribeRSS Feed
nicolaskan
Fluorite | Level 6

Dear all SAS experts,

 

i have read several articles in related to the setup of the connection of SAS EG to jupyter notebook yet i still couldn't solve the problem; therefore i would like to post a question here and seek for the advice particular to my challenge.

 

SAS Version: SAS EG 7.1 (i.e. server version, not a local machine)

Jupyter Notebook: Python

 

I have installed the package "saspy." When i type the following:

import saspy

sas = saspy.SASsession(cfgname='winlocal')

 

An pop-up message comes up:

The SAS Config name specified was not found. Please enter the SAS Config you wish to use. Available Configs are: ['default']

when i type "default", it comes up the error

Cannot use STDIO I/O module on Windows. No SASsession established. Choose an IOM SASconfig definition

 

Since i'm not the expert in infrastructure setup, i m not sure how to solve this problem.

May i seek for the expert help here to provide an example how to code in the details?

 

SAS EG Server Setup:

Server = Remote

Machine = "xxx.com"

Port: "1234"

User: "abc@xxx

Password: "yyy"

 

Thanks a lot

5 REPLIES 5
alexal
SAS Employee

@nicolaskan ,

 

You have to define SAS connection settings in sascfg_personal.py file. Please see details here.

nicolaskan
Fluorite | Level 6

Thanks for the kindly help. I think i'm getting closer to the end point.

 

Some further questions would like to seek for the advice.

 

I have created "sascfg_personal.py" file to my "site-package" folder.

May i know how i can modify this file?

Should i put my SAS connection details into it and which?

 

Thanks again.

 

alexal
SAS Employee

@nicolaskan ,


A page I mentioned above has a very good explanation of what you should add to that file. It all depends on where SAS is installed and how you want to connect.

sastpw
SAS Employee

Yes, the configuration is explained here https://sassoftware.github.io/saspy/install.html#iom And, given you use EG, you would be using the Remote IOM connection configuration.

 

EG doesn't not connect to Jupyter. Rather, Jupyter can execute Python code. saspy is a Python Module you can use to connect Python to the same workspace server as your EG client connects to. That's remote IOM. saspy and EG do not share anything nor interact with each other. They are two different clients which can each connect to workspace servers.

 

The configuration doc linked to will describe that you need the host name (or IP) of the Object Spawner (not the Metadata Server), and the port number for the workspace server (again, not the metadata server). Your  metadata credentials would be the same as EG, probably (if you're connecting to the same server). The rest of the configuration options are documented in that configuration section.

 

Unlike EG, which uses the .Net IOM client, saspy uses the Java IOM client (as it works on other platforms than just windows) so, as documented, you will need Java (Version 7 or 8 work best). You also need 4 .jar files from your SAS instalation. You may find these jar files in your EG client, and those may work. I occasionally hear from customers that their EG jars didn't work (don't actually contain some classes that are in the copys of those jars in the real SAS deployment). If your EG jars work, then that's fine. Else you can copy the ones from where your workspace server is installed, or any other SAS9 install, to your client machine.

 

There is also a Troubleshooting Guide that shows all of the usual error you may get when the configuration steps aren't followed, and how to fix them: https://sassoftware.github.io/saspy/troubleshooting.html#iom

 

Hopefully, you can set up the config file with these and be up and running.

 

You can always open an issue on the saspy github site also, getting help directly from there if you need further assistance: https://github.com/sassoftware/saspy/issues

 

And, you can continue to reply here if you like too.

 

Thanks,

Tom

sastpw
SAS Employee

@nicolaskan , were you able to get connected after looking and the configuration documentation?

Do you need any further assistance?

Thanks,

Tom

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 5 replies
  • 6555 views
  • 3 likes
  • 3 in conversation