Skip to main content
updated steps to reproduce the issue (on a server)
Source Link
JDDS
  • 79
  • 2
  • 10

In my case, running the command ipython kernel automatically leads to the above error message.

  1. Install the newest anaconda3 version.
  2. Run Jupyter notebook in the base version --> Kernel runs fine
  3. Create a new environment with python: conda create -n test python=3.7
  4. After activating the environment, Jupyter notebook is not available, thus I must install it via Conda: conda install -c anaconda jupyter
  5. Run Jupyter notebook in the test environment --> Kernel breaks down as explained above

When tryingThere seems to install Tensorflow v. 2.0.0 via pip, the notebook kernel crashed and would not start anymorebe an issue with file permissions when running Jupyter on a server inside a Conda environment. Thus, I deleted and reinstalled the environment (no effect), uninstalled anaconda and reinstalled it again (no effect), deleted the kernels and activated them again for the current user via the command python -m ipykernel install --user (no effect), and tried to installgive all files inside my anaconda3 folder the environment both with python version 3.6 and 3.7requested permissions (no effect0600), but this did not help.

In my case, running the command ipython kernel automatically leads to the above error message.

When trying to install Tensorflow v. 2.0.0 via pip, the notebook kernel crashed and would not start anymore. Thus, I deleted and reinstalled the environment (no effect), uninstalled anaconda and reinstalled it again (no effect), deleted the kernels and activated them again for the current user via the command python -m ipykernel install --user (no effect), and tried to install the environment both with python version 3.6 and 3.7 (no effect).

  1. Install the newest anaconda3 version.
  2. Run Jupyter notebook in the base version --> Kernel runs fine
  3. Create a new environment with python: conda create -n test python=3.7
  4. After activating the environment, Jupyter notebook is not available, thus I must install it via Conda: conda install -c anaconda jupyter
  5. Run Jupyter notebook in the test environment --> Kernel breaks down as explained above

There seems to be an issue with file permissions when running Jupyter on a server inside a Conda environment. I tried to give all files inside my anaconda3 folder the requested permissions (0600), but this did not help.

Source Link
JDDS
  • 79
  • 2
  • 10

Kernel error: jupyter_client/connect.py AssertionError

Error message

Traceback (most recent call last): File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/web.py", line 1699, in _execute result = await result File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 742, in run yielded = self.gen.throw(*exc_info) # type: ignore File "/home/djan/anaconda3/lib/python3.7/site-packages/notebook/services/sessions/handlers.py", line 72, in post type=mtype)) File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 735, in run value = future.result() File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 742, in run yielded = self.gen.throw(*exc_info) # type: ignore File "/home/djan/anaconda3/lib/python3.7/site-packages/notebook/services/sessions/sessionmanager.py", line 88, in create_session kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name) File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 735, in run value = future.result() File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 742, in run yielded = self.gen.throw(*exc_info) # type: ignore File "/home/djan/anaconda3/lib/python3.7/site-packages/notebook/services/sessions/sessionmanager.py", line 101, in start_kernel_for_session self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name) File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 735, in run value = future.result() File "/home/djan/anaconda3/lib/python3.7/site-packages/tornado/gen.py", line 209, in wrapper yielded = next(result) File "/home/djan/anaconda3/lib/python3.7/site-packages/notebook/services/kernels/kernelmanager.py", line 168, in start_kernel super(MappingKernelManager, self).start_kernel(**kwargs) File "/home/djan/anaconda3/lib/python3.7/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel km.start_kernel(**kwargs) File "/home/djan/anaconda3/lib/python3.7/site-packages/jupyter_client/manager.py", line 240, in start_kernel self.write_connection_file() File "/home/djan/anaconda3/lib/python3.7/site-packages/jupyter_client/connect.py", line 547, in write_connection_file kernel_name=self.kernel_name File "/home/djan/anaconda3/lib/python3.7/site-packages/jupyter_client/connect.py", line 212, in write_connection_file with secure_write(fname) as f: File "/home/djan/anaconda3/lib/python3.7/contextlib.py", line 112, in __enter__ return next(self.gen) File "/home/djan/anaconda3/lib/python3.7/site-packages/jupyter_client/connect.py", line 105, in secure_write assert '0600' == oct(stat.S_IMODE(os.stat(fname).st_mode)).replace('0o', '0') AssertionError 

System information

Running Jupyter (v. 1.0.0) on a Linux server, with anaconda3 (v. 2019.07) 64-bit.

Available Kernels

Available kernels:
   python3    /home/djan/.local/share/jupyter/kernels/python3
   nn      /home/djan/.local/share/jupyter/kernels/nn

Reproducing the issue

In my case, running the command ipython kernel automatically leads to the above error message.

What I tried so far

When trying to install Tensorflow v. 2.0.0 via pip, the notebook kernel crashed and would not start anymore. Thus, I deleted and reinstalled the environment (no effect), uninstalled anaconda and reinstalled it again (no effect), deleted the kernels and activated them again for the current user via the command python -m ipykernel install --user (no effect), and tried to install the environment both with python version 3.6 and 3.7 (no effect).