BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
JackHamilton
Lapis Lazuli | Level 10

Hello,

 

I uninstalled Miniconda, sas_kernel, and saspy.  As far as I could tell, everything that's disk-based was deleted or moved to a backup directory.

 

I then installed the full Anaconda and issued these commands:

 

pip install sas_kernel
conda install -c conda-forge saspy
jupyter kernelspec list

 

The commands appeared to execute successfully, but the result from the last command was:

 

Available kernels:
python3 C:\Users\c449630\AppData\Local\Continuum\anaconda3\share\jupyter\kernels\python3

 

Note: no SAS kernel shown.

 

I then started a Jupyter notebook.  In the first cell I put 

 

import saspy
saspy

 

That printed 

 

<module 'saspy' from 'C:\\Users\\c449630\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\saspy\\__init__.py'>

 

I had saved a copy of my working sascfg_personal.py file, and I copied it into the directory shown.

 

In the next cell I entered:

 

%%SAS
proc print data=sashelp.class (obs=1);
run;

 

And the result was:

 

Using SAS Config named: winiomsolaris
SAS Connection established. Subprocess id is 12040

Out[2]:

The SAS System

 
Obs Name Sex Age Height Weight
1 Alfred M 14 69 112.5

 

So saspy is installed and configured well enough to start a SAS session on the server and talk to it. 

 

Any ideas?  Why is Jupyter not finding the SAS kernel?

 

The kernel also doesn't show up in Jupyter Lab.

1 ACCEPTED SOLUTION

Accepted Solutions
sastpw
SAS Employee

Well, I'm not familiar with Atom either, but I suspect you're on track with what to do to fix it.

 

On the running jupyter when you have 2 anacondas installed, I was able to replicate the problem where sas_kernel is installed using one version but jupyter is running in the other python. Jupyter stores info in your user dir, so it's independent of the python install. So it thinks the kernel is available regardless of if it's actually in the python it's running in or not. Easy fix though, but doing everything from in the anaconda tools, you don't always know which one your in, and if you use their multiple environments, the confusion just multiplies.

 

I'll stick w/ one anaconda install and know where I am and what I really have installed 🙂 

 

Tom

View solution in original post

11 REPLIES 11
sastpw
SAS Employee

Well, no, I don't know why. But I suppose my guess is that 'pip' isn't the one in the anaconda you're using?

I'm guessing sas_kernel was installed in some other python. Can you verify what 'pip' is executing? Can you uninstall and reinstall sas_kernel via the full path to pip in your anaconda and show the log from those? Then maybe we can see something.

 

Thanks!

Tom

JackHamilton
Lapis Lazuli | Level 10

Update:  Although the "where" command indicated that "pip" should be finding the main Anaconda pip, I looked around to see what other copies there might be on the system.  A surprising number, it turned out.  I got rid of all of them, re-installed the sas_kernel, and it worked!

 

I think the pip it was finding was from the Atom editor, because uninstalling that was the last thing I did before the sas_kernel started working again.

 

Atom didn't seem to be in the system path, but Windows has many ways to find executables.  Now to re-install Atom and see if anything stops working again.

 

Thanks for your help.

sastpw
SAS Employee

Hey, that's great news!

Yeah, I'm working on another one of these that seems like this same problem, but it's hard to know what's configured how on windows when people have been trying to install and or reinstall anaconda or other python things. Anaconda can be installed with a number of different choices that affect environment variables and things, not to mention being a user or an admin. 

 

I've been trying this out myself yesterday and today to try to get a better understanding of what all the variables are. Although I have Anaconda on my pc, I have never used any of it's tools to do anything with python. Using those is different than just using the python.exe directly outside of the anaconda shell or navigator ...  So, I'm trying to use those to see what happens too.

 

I'm glad this turned out to be the issue and that you were able to clean up everything and now it works as expected. 

Do you mind marking this issue as solved, so that others who may be in this same boat might find this if they search for similar problem that's been solved? 

 

Thanks!

Tom

JackHamilton
Lapis Lazuli | Level 10

Interestingly, the problem is now solved for Jupyter but the sas_kernel no longer works in Atom.  It shows up in the kernel list, but doesn't actually run.

 

This must the Open Source equivalent of Microsoft's DLL Hell.

 

sastpw
SAS Employee

Well, I'm not familiar with Atom either, but I suspect you're on track with what to do to fix it.

 

On the running jupyter when you have 2 anacondas installed, I was able to replicate the problem where sas_kernel is installed using one version but jupyter is running in the other python. Jupyter stores info in your user dir, so it's independent of the python install. So it thinks the kernel is available regardless of if it's actually in the python it's running in or not. Easy fix though, but doing everything from in the anaconda tools, you don't always know which one your in, and if you use their multiple environments, the confusion just multiplies.

 

I'll stick w/ one anaconda install and know where I am and what I really have installed 🙂 

 

Tom

JackHamilton
Lapis Lazuli | Level 10

After a few reboots for other reasons, SAS appears for the moment to be working in both Jupyter Notebooks and Atom.  It also works in Jupyter Lab.  It may depend on the order in which programs are installed.

sastpw
SAS Employee

Great!, Well I guess that makes some sense. You said you uninstalled and reinstalled some of this, and it is windows, after all. A few reboots probably is necessary to get it all working right again 🙂

 

Glad you're back to having it all work!

 

Tom

muhuri
Calcite | Level 5

Hi,

 

The SAS kernel with JupyterLab (Windows, SAS 9.4M6), which was working fine earlier, is currently not working (No Kernel) after conda is updated. I have done the update by issuing this command at the Anaconda Prompt: “conda update –all”.

 

After updating conda, I have launched JupyterLab, selected the SAS Kernel, and then tried to run a simple SAS snippet (Windows, SAS 9.4M6, not SAS University Edition) from a Jupyter Cell. I have found ‘No Kernel’, and that is the only issue I am experiencing.

 

However, using the Python kernel, with the ”import saspy”, and the %%SAS magic command in Jupyter cells, I have run SAS applications successfully.

 

Any help with a resolution of this issue (No Kernel for SAS) would be greatly appreciated.

Thanks.

sastpw
SAS Employee

Well, I don't know what all happened with the conda update all, but have you tried reinstalling the SAS_kernel? Maybe that is the next necessary step?

muhuri
Calcite | Level 5

Yes, I did reinstall sas_kernel, which I did not mention in my initial posting. Sorry about that,

 

When I reinstall  sas_kernel for the second time, I get the following message as I got after the first sas_kernel reinstall.

Requirement already satisfied:.

 

Please let me know if you have any other suggestion about making SAS kernel work.

Thanks,

sastpw
SAS Employee

Hmm, well, having no idea the state of your system, it didn't sound like it actually reinstalled it. try explicitly uninstalling it, then installing it and you should see that it actually 're-installed' it. Else, I'm guessing that nothing actually happened.

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 11 replies
  • 4629 views
  • 2 likes
  • 3 in conversation