2

I work on two servers, serverA and serverB. On both of them, my home directory is mapped to the same location. Other than the home directory, the servers have independent file systems. This includes system directories and application directories. So, I created a special .bashrc_serverb file that is sourced if my hostname is serverB. This resets my path.

balter@serverB:~$ echo $PATH /mnt/scratch/miniconda3/bin:/bin:/usr/local/bin:/usr/bin

I first installed conda and jupyter while logged in to serverA. Apparently it created a file ~/.local/share/jupyter/kernels/python3. I also installed conda and jupyter on serverB. Now when I try to run jupyter notebook or jupyter-console on serverB, I get:

``` balter@serverB:~$ jupyter-console [ZMQTerminalIPythonApp] ERROR | Failed to run command: ['/home/...miniconda3/bin/python', '-m', 'ipykernel', '-f', '/home/users/balter/.local/share/jupyter/runtime/kernel-26741.json'] PATH='/mnt/scratch/miniconda3/bin:/bin:/usr/local/bin:/usr/bin' with kwargs: {'stdin': -1, 'cwd': None, 'start_new_session': True, 'stdout': None, 'stderr': None}

Traceback (most recent call last): File "/mnt/scratch/miniconda3/bin/jupyter-console", line 5, in app.main() File "/mnt/scratch/miniconda3/lib/python3.5/site-packages/jupyter_core/application.py", line 267, in launch_instance return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs) File "/mnt/scratch/miniconda3/lib/python3.5/site-packages/traitlets/config/application.py", line 657, in launch_instance app.initialize(argv) File "", line 2, in initialize File "/mnt/scratch/miniconda3/lib/python3.5/site-packages/traitlets/config/application.py", line 87, in catch_config_error return method(app, *args, **kwargs) File "/mnt/scratch/miniconda3/lib/python3.5/site-packages/jupyter_console/app.py", line 141, in initialize self.init_shell() File "/mnt/scratch/miniconda3/lib/python3.5/site-packages/jupyter_console/app.py", line 109, in init_shell JupyterConsoleApp.initialize(self) File "/mnt/scratch/miniconda3/lib/python3.5/site-packages/jupyter_client/consoleapp.py", line 334, in initialize self.init_kernel_manager() File "/mnt/scratch/miniconda3/lib/python3.5/site-packages/jupyter_client/consoleapp.py", line 288, in init_kernel_manager self.kernel_manager.start_kernel(**kwargs) File "/mnt/scratch/miniconda3/lib/python3.5/site-packages/jupyter_client/manager.py", line 243, in start_kernel **kw) File "/mnt/scratch/miniconda3/lib/python3.5/site-packages/jupyter_client/manager.py", line 189, in _launch_kernel return launch_kernel(kernel_cmd, **kw) File "/mnt/scratch/miniconda3/lib/python3.5/site-packages/jupyter_client/launcher.py", line 123, in launch_kernel proc = Popen(cmd, **kwargs) File "/mnt/scratch/miniconda3/lib/python3.5/subprocess.py", line 947, in init restore_signals, start_new_session) File "/mnt/scratch/miniconda3/lib/python3.5/subprocess.py", line 1551, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: '/home/...miniconda3/bin/python' ```

The last line is the crucial one. That path is on serverA (full path obscured for security).

What is the fix for this?

Cross-posted as jupyter issue.

abalter
  • 9,663
  • 17
  • 90
  • 145

0 Answers0