BookmarkSubscribeRSS Feed
Mostafa11
SAS Employee

How to install a new python library to be used in the custom step ?Custom step Error.png

4 REPLIES 4
ballardw
Super User

Show the code that generated those errors.

Best is to include a LOG entry if created. Include code along with all the notes, warnings or errors as well.

Copy the text and paste into a text box opened on the forum with the </> icon that appears above the message window to preserve formatting. Also if we have actual text and want to suggest a syntax change we  can copy/edit/paste text that is not possible with pictures.

 

Since your picture of the errors includes a reference to the macro variable &temp_python you need to show what the definition of that macro variable is and perhaps even how it was created. The error message implies that you used the macro variable somewhere SAS expects to encounter a file name that must exist before the code runs. Apparently that file does not actually exist. So make sure it exists or fix the contents of the macro variable.

adam633_SAS
Calcite | Level 5
Please demonstrate your code so that we can truly help you.
Mostafa11
SAS Employee

Mostafa11_0-1695796186089.png

When I run it again I have got this error

 

ERROR: Unhandled Python exception.
>>>
Traceback (most recent call last):
File "<stdin>", line 5, in <module>
File "<stdin>", line 2, in <module>
File "<string>", line 4
!pip install tabula-py
^
SyntaxError: invalid syntax
>>>
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PYTHON used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

LinusH
Tourmaline | Level 20

I don't have access to Viya 4 so bear with me.

According to the documentation it looks like you need to use a SAS program. From your screen shot it looks like you are in a Python wrapper editor kinda, which I guess might work...?

Regardless, the log tells us that your code executed in PROC PYTHON, and somehow your syntax i incorrect.

It would be interesting to see the complete code with PROC PYTHON.

Data never sleeps

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 4 replies
  • 2155 views
  • 0 likes
  • 4 in conversation