BookmarkSubscribeRSS Feed
U2
Fluorite | Level 6 U2
Fluorite | Level 6

Hi Team,

 

I want to connect to sas from python .

I have installed saspy package and updated the sascfg_personal.txt file and usually i use to login sas using sas studio(i dont have any sas software in my local machine) and i have username and password .In this file i have updated sas_config_options .

Now i am using editor Jupyter notebook and i need to connect to sas from python .

 

I have given the below commands 

import saspy

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

 

when ever i use to run the above command i am getting the below error as :please enter the OMR user id 

3 REPLIES 3
sastpw
SAS Employee

Have you looked at the instructions https://sassoftware.github.io/saspy/configuration.html#iom?

The sascfg_personal.py file is a python module, not a .txt file, but I assume you just typed that wrong here, else you would be getting an error, not being prompted for credentials. 

Can you provide the contents of that file so I can see what you've done? Can't really help without any information. FWIW, did it connect when you provided your credentials? Did you try to put them in the authinfo file, so you don't need to enter them? 

ChrisNZ
Tourmaline | Level 20

Please select a reply as the answer if you answered your question.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 3 replies
  • 993 views
  • 0 likes
  • 3 in conversation