I am working in SAS Viya because I am needing to use proc python. I thought that it would be best to do this in SAS Viya since the upper part of my code grabs various PDFs from a website. Then, I am trying to get the proc python to run the translation.
This is the code I am using:
/*start code*/
proc python;
You appear to define a SAS macro variable.
%let output_folder =C:\Users\xxx;
Then later in the middle of your PYTHON code you appear to be trying to reference the macro variable's value.
pdf_folder = r'&output_folder.'
Normally the SAS macro processor will ignore macro triggers (such as & and %) when they are enclosed in single quotes.
What happens when you instead hardcode the filename in the PYTHON code?
Also I seriously doubt that VIYA or Python will be able to use WINDOWS/DOS style filenames like that.
This seems to have helped but when I run it, I still get an error and now it adds,
It should be possible to install packages, but you need to do it in advance.
Check out this thread:
I am using SAS Viya on the web...I don't understand how I am to do what the link says. Sidenote, I have also tried using python directly but apparently there is an issue with downloading polyglot with the current version of pip...
Send the question to whoever is running the VIYA server that you are using. If that is SAS itself then open a support ticket with SAS and ask them if they can install the python package you need.
Dive into keynotes, announcements and breakthroughs on demand.
Explore Now →