BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jnvickery
Obsidian | Level 7

Hi,

 

I have installed the SAS kernel for Jupyter Notebooks following the instructions here:

https://sassoftware.github.io/sas_kernel/install.html#windows-install-assuming-sas-already-installed

 

I am able to connect to the SAS kernel and run code, view output, etc. but I have not been able to enable syntax highlighting. Any ideas as to how to enable that?

 

Here are a few more details about my installation:

Windows 7

SAS version 9.4 (TS1M0) is installed locally

Anaconda distribution of Jupyter

I edited the "sascfg.py" file to point to the path for SAS startup script and I edited the paths for the local classpath variable.

I also had to add the path to sspiauth.dll to my System PATH.

 

Thanks!

John

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jared
SAS Employee

@jnvickery, You can add the SAS syntax by following the instructions here: https://sassoftware.github.io/sas_kernel/install.html#installing-sas-nbextensions

 

I wrote a couple of Notebook (NB) extensions that once enabled will allow you to use the SAS syntax coloring or hte python depending on your use case.

 

Jared 

View solution in original post

4 REPLIES 4
ChrisHemedinger
Community Manager

Glad you got this going!

 

@Jared might be able to provide some guidance on the syntax highlighting.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
Jared
SAS Employee

@jnvickery, You can add the SAS syntax by following the instructions here: https://sassoftware.github.io/sas_kernel/install.html#installing-sas-nbextensions

 

I wrote a couple of Notebook (NB) extensions that once enabled will allow you to use the SAS syntax coloring or hte python depending on your use case.

 

Jared 

jnvickery
Obsidian | Level 7

Thanks @Jared

That worked great. I hadn't realized that the functionality was controlled through the notebook extensions.

 

For anyone else installing the extensions...

When I first ran the commands to install and enable the extensions, I got the following errors:

[InstallNBExtensionApp] CRITICAL | Bad config encountered during initialization:
[InstallNBExtensionApp] CRITICAL | Unrecognized flag: '--py'

 

Updating jupyter notebooks with the following command and then re-running the install commands resolved the error.

"conda update notebook"

 

- John

 

 

Jared
SAS Employee

@jnvickery Glad it worked! The syntax actually comes from the CodeMirror mode for SAS if you find issues please let me know. 

 

Jared

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 4671 views
  • 2 likes
  • 3 in conversation