Closed wikwok closed 5 years ago
I see no reason to believe this is a bug in pywin32 - the win32 function GetFileSecurity()
is just failing when used in this context. I suggest you open a jupyter bug.
@mhammond you were right! It is NOT a pywin32 issue!
I found the problem and a solution as described below in comment for anyone that may land here looking for an answer.
Many thanks goes to @kevin-bates for finding this solution!
This is my story for anyone else to learn (I run Anconda which comes pre installed with Jupyter):
1- When checking the environment paths by using this command: jupyter --paths I get two roaming locations one for runtime and one for data! This is because I use a corporate laptop and Windows is setup to store user data files in a roaming location on the network!
(base) C:\>jupyter --paths
config:
C:\Users\user_x\.jupyter
C:\ProgramData\Anaconda3\etc\jupyter
C:\ProgramData\jupyter
data:
\\A-FILEDATA-P\Profile\use_x\AppData\Roaming\jupyter
C:\ProgramData\Anaconda3\share\jupyter
C:\ProgramData\jupyter
runtime:
\\A-FILEDATA-P\Profile\use_x\AppData\Roaming\jupyter\runtime
(base) C:\>
2- So, I tried modifying C:\Users\user_xxx.jupyter\jupyter_notebook_config.py by adding
JUPYTER_RUNTIME_DIR = 'C:\Users\user_x\AppData\Roaming\jupyter\runtime'
but it did not work!
2- However, Big note here: I noticed that jupyter lab command fire a "stand alone" Chrome I have on a removable usb harddisk! which under the corporate Windows setup does not have any rights to write to other folder location on the laptop, thus the security error!
3- The solution was to setup two folders on my usb disk, where stand alone Chrome is found and set the environment variables to point to those locations like this:
set JUPYTER_RUNTIME_DIR=D:\jupyter\runtime
set JUPYTER_DATA_DIR=D:\jupyter
4- The only catch is that you have to do these two commands at the start of every new session as they don't persist say when you restart Jupyter lab! and as @Shongololo pointed out you can only run other programs like Spyder from the command line only for it to read the correct settings!
It remains to be found out how this could be resolved permanently.
Description
Launching jupyter notebook v1.1.4 python3.7 from Anaconda3 throws kernel error on windows 8.1
Default installation of jupyterlab v1.0.2 compiled with Anaconda3 works fine and not prone to this error.
Also Mac seems not prone to this issue when testing it on Mac.
inspecting the terminal feed, it seems that pywin32 has a bug on windows8.1 causing the kernal to fail.
Please see full details below:
Reproduce
At first instance jupyter was automatically updated when installing other Anaconda3 packages which seemed to cause the error. However, after testing lots of setups and finally installing jupyterlab on a fresh clean anaconda environment determined that the new version has got a bug running on windows 8.1 Enterprise 64bit SP0 at the least. I don't know if other versions of windows are prone to this.
Expected behavior
create new python3.7 notebooks without any kernel errors due to pywin32.
Context
Troubleshoot Output
Command Line Output
Browser Output