Description
I hate to spam you, Kevin.
I'm doing a local basic Enterprise Gateway local install (hopefully for more websocket testing in the future!)
Here's my setup (following the general guide). I did the clean install to make sure the error wasn't specific to my original environment.
conda create --name gateway python=3.6
conda activate gateway
conda install -c conda-forge jupyter_enterprise_gateway
I then start Enterprise Gateway with
jupyter enterprisegateway --ip=0.0.0.0 --port_retries=0 --log-level=DEBUG
which launches the Gateway on port 8888.
and my notebook with
jupyter notebook --gateway-url=http://localhost:8888 --port=7000 --GatewayClient.http_user=guest --GatewayClient.http_pwd=guest-password
in a different terminal.
Both processes initially function fine. /api/kernelspecs returns correctly, the kernel starts, then refreshes. The "Fatal Python error: failed to get random numbers to initialize Python" fails then.
Here's the detailed logs:
[D 2020-12-01 21:07:42.225 EnterpriseGatewayApp] Searching ['C:\\Users\\Operator', 'C:\\Users\\Operator\\.jupyter', 'C:\\Users\\Operator\\anaconda3\\envs\\gateway\\etc\\jupyter', 'C:\\ProgramData\\jupyter'] for config files
[D 2020-12-01 21:07:42.226 EnterpriseGatewayApp] Looking for jupyter_config in C:\ProgramData\jupyter
[D 2020-12-01 21:07:42.227 EnterpriseGatewayApp] Looking for jupyter_config in C:\Users\Operator\anaconda3\envs\gateway\etc\jupyter
[D 2020-12-01 21:07:42.231 EnterpriseGatewayApp] Looking for jupyter_config in C:\Users\Operator\.jupyter
[D 2020-12-01 21:07:42.232 EnterpriseGatewayApp] Looking for jupyter_config in C:\Users\Operator
[D 2020-12-01 21:07:42.233 EnterpriseGatewayApp] Looking for jupyter_enterprise_gateway_config in C:\ProgramData\jupyter
[D 2020-12-01 21:07:42.234 EnterpriseGatewayApp] Looking for jupyter_enterprise_gateway_config in C:\Users\Operator\anaconda3\envs\gateway\etc\jupyter
[D 2020-12-01 21:07:42.235 EnterpriseGatewayApp] Looking for jupyter_enterprise_gateway_config in C:\Users\Operator\.jupyter
[D 2020-12-01 21:07:42.235 EnterpriseGatewayApp] Looking for jupyter_enterprise_gateway_config in C:\Users\Operator
[D 201201 21:07:42 selector_events:54] Using selector: SelectSelector
[I 2020-12-01 21:07:42.245 EnterpriseGatewayApp] Jupyter Enterprise Gateway 2.4.0 is available at http://0.0.0.0:8888
[D 2020-12-01 21:07:49.491 EnterpriseGatewayApp] Found kernel python3 in C:\Users\Operator\anaconda3\envs\gateway\share\jupyter\kernels
[D 2020-12-01 21:07:49.492 EnterpriseGatewayApp] Found kernel metakernel_python in C:\ProgramData\jupyter\kernels
[I 201201 21:07:49 web:2243] 200 GET /api/kernelspecs (127.0.0.1) 182.04ms
[D 2020-12-01 21:07:55.677 EnterpriseGatewayApp] Found kernel python3 in C:\Users\Operator\anaconda3\envs\gateway\share\jupyter\kernels
[D 2020-12-01 21:07:55.678 EnterpriseGatewayApp] Found kernel metakernel_python in C:\ProgramData\jupyter\kernels
[I 201201 21:07:55 web:2243] 200 GET /api/kernelspecs (127.0.0.1) 5.00ms
[D 2020-12-01 21:07:55.754 EnterpriseGatewayApp] RemoteMappingKernelManager.start_kernel: None, kernel_username: guest
[D 2020-12-01 21:07:55.769 EnterpriseGatewayApp] Instantiating kernel 'Python 3' with process proxy: enterprise_gateway.services.processproxies.processproxy.LocalProcessProxy
[D 2020-12-01 21:07:55.776 EnterpriseGatewayApp] Starting kernel (async): ['C:/Users/Operator/anaconda3/envs/gateway\\python.exe', '-m', 'ipykernel_launcher', '-f', 'C:\\Users\\Operator\\AppData\\Roaming\\jupyter\\runtime\\kernel-0f59d11b-cf82-4592-aa56-c351c5b19637.json']
[D 2020-12-01 21:07:55.777 EnterpriseGatewayApp] Launching kernel: 'Python 3' with command: ['C:/Users/Operator/anaconda3/envs/gateway\\python.exe', '-m', 'ipykernel_launcher', '-f', 'C:\\Users\\Operator\\AppData\\Roaming\\jupyter\\runtime\\kernel-0f59d11b-cf82-4592-aa56-c351c5b19637.json']
[D 2020-12-01 21:07:55.778 EnterpriseGatewayApp] BaseProcessProxy.launch_process() env: {'PATH': 'C:\\Users\\Operator\\anaconda3\\envs\\gateway;C:\\Users\\Operator\\anaconda3\\envs\\gateway\\Library\\mingw-w64\\bin;C:\\Users\\Operator\\anaconda3\\envs\\gateway\\Library\\usr\\bin;C:\\Users\\Operator\\anaconda3\\envs\\gateway\\Library\\bin;C:\\Users\\Operator\\anaconda3\\envs\\gateway\\Scripts;C:\\Users\\Operator\\anaconda3\\envs\\gateway\\bin;C:\\Users\\Operator\\anaconda3\\condabin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.0\\bin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.0\\libnvvp;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.0\\bin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.0\\libnvvp;C:\\Windows\\System32;C:\\Windows;C:\\Windows\\System32\\wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0;C:\\Windows\\System32\\OpenSSH;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Windows\\System32;C:\\Windows;C:\\Windows\\System32\\wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0;C:\\Windows\\System32\\OpenSSH;C:\\Program Files (x86)\\PharosSystems\\Core;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files (x86)\\Wolfram Research\\WolframScript;C:\\Program Files\\nodejs;C:\\Program Files\\Git\\cmd;C:\\Program Files\\PuTTY;C:\\Program Files\\Amazon\\AWSCLIV2;C:\\bin;C:\\Program Files (x86)\\GnuPG\\bin;C:\\Program Files\\Docker\\Docker\\resources\\bin;C:\\ProgramData\\DockerDesktop\\version-bin;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.0\\lib\\x64;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUPTI\\lib64;C:\\Users\\Operator\\AppData\\Local\\Programs\\Python\\Python38-32\\Scripts;C:\\Users\\Operator\\AppData\\Local\\Programs\\Python\\Python38-32;C:\\Users\\Operator\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\Operator\\AppData\\Roaming\\npm;C:\\Users\\Operator\\AppData\\Local\\atom\\bin;C:\\Users\\Operator\\AppData\\Local\\GitHubDesktop\\bin;C:\\Users\\Operator\\AppData\\Local\\Microsoft\\WindowsApps;.', 'KERNEL_LAUNCH_TIMEOUT': '40', 'KERNEL_USERNAME': 'guest', 'KERNEL_WORKING_DIR': 'C:\\Users\\Operator', 'KERNEL_GATEWAY': '1', 'KERNEL_ID': '0f59d11b-cf82-4592-aa56-c351c5b19637', 'KERNEL_LANGUAGE': 'python', 'EG_IMPERSONATION_ENABLED': 'False'}
[I 2020-12-01 21:07:55.783 EnterpriseGatewayApp] Local kernel launched on '10.0.0.193', pid: 26996, pgid: 0, KernelID: 0f59d11b-cf82-4592-aa56-c351c5b19637, cmd: '['C:/Users/Operator/anaconda3/envs/gateway\\python.exe', '-m', 'ipykernel_launcher', '-f', 'C:\\Users\\Operator\\AppData\\Roaming\\jupyter\\runtime\\kernel-0f59d11b-cf82-4592-aa56-c351c5b19637.json']'
[D 2020-12-01 21:07:55.785 EnterpriseGatewayApp] Connecting to: tcp://127.0.0.1:59055
[D 2020-12-01 21:07:55.788 EnterpriseGatewayApp] Connecting to: tcp://127.0.0.1:59052
[I 2020-12-01 21:07:55.790 EnterpriseGatewayApp] Kernel started: 0f59d11b-cf82-4592-aa56-c351c5b19637, name: python3
[D 2020-12-01 21:07:55.790 EnterpriseGatewayApp] Kernel args: {'env': {'PATH': 'C:\\Users\\Operator\\anaconda3\\envs\\gateway;C:\\Users\\Operator\\anaconda3\\envs\\gateway\\Library\\mingw-w64\\bin;C:\\Users\\Operator\\anaconda3\\envs\\gateway\\Library\\usr\\bin;C:\\Users\\Operator\\anaconda3\\envs\\gateway\\Library\\bin;C:\\Users\\Operator\\anaconda3\\envs\\gateway\\Scripts;C:\\Users\\Operator\\anaconda3\\envs\\gateway\\bin;C:\\Users\\Operator\\anaconda3\\condabin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.0\\bin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.0\\libnvvp;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.0\\bin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.0\\libnvvp;C:\\Windows\\System32;C:\\Windows;C:\\Windows\\System32\\wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0;C:\\Windows\\System32\\OpenSSH;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Windows\\System32;C:\\Windows;C:\\Windows\\System32\\wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0;C:\\Windows\\System32\\OpenSSH;C:\\Program Files (x86)\\PharosSystems\\Core;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files (x86)\\Wolfram Research\\WolframScript;C:\\Program Files\\nodejs;C:\\Program Files\\Git\\cmd;C:\\Program Files\\PuTTY;C:\\Program Files\\Amazon\\AWSCLIV2;C:\\bin;C:\\Program Files (x86)\\GnuPG\\bin;C:\\Program Files\\Docker\\Docker\\resources\\bin;C:\\ProgramData\\DockerDesktop\\version-bin;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.0\\lib\\x64;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUPTI\\lib64;C:\\Users\\Operator\\AppData\\Local\\Programs\\Python\\Python38-32\\Scripts;C:\\Users\\Operator\\AppData\\Local\\Programs\\Python\\Python38-32;C:\\Users\\Operator\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\Operator\\AppData\\Roaming\\npm;C:\\Users\\Operator\\AppData\\Local\\atom\\bin;C:\\Users\\Operator\\AppData\\Local\\GitHubDesktop\\bin;C:\\Users\\Operator\\AppData\\Local\\Microsoft\\WindowsApps;.', 'KERNEL_LAUNCH_TIMEOUT': '40', 'KERNEL_USERNAME': 'guest', 'KERNEL_WORKING_DIR': 'C:\\Users\\Operator'}, 'kernel_headers': {}, 'kernel_name': None}
Fatal Python error: failed to get random numbers to initialize Python
AsyncIOLoopKernelRestarter then takes over and repeats the start-stop-refresh-fail sequence five times.
A quick Google suggests this may have something to do with environment variables, if it's at all helpful.
https://www.scivision.dev/python-calling-python-subprocess/