Kernel Restart (Ctrl+.) in spyder not working - python

I have recently updated my Anaconda and Spyder app! But in this new version of Spyder (version 4), when I restart the kernel (with short key and from console in above ribbon), the Restart kernel confirmation window shows up, Then I press the "yes" button but nothing happens.
Can anyone help me with this?

I have the same problem with Spyder 5.2.2 :
Spyder version: 5.2.2 None
Python version: 3.7.9 64-bit
Qt version: 5.12.10
PyQt5 version: 5.12.3
Operating System: Windows 10
When restarting the kernel, I get this:
Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython 7.31.1 -- An enhanced Interactive Python.
Restarting kernel...
Traceback (most recent call last):
File "C:\Users\fa125436\Miniconda3\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\fa125436\Miniconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\spyder_kernels\console\__main__.py", line 22, in <module>
from spyder_kernels.console import start
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\spyder_kernels\console\start.py", line 21, in <module>
import ipykernel
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\ipykernel\__init__.py", line 2, in <module>
from .connect import *
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\ipykernel\connect.py", line 10, in <module>
import jupyter_client
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\__init__.py", line 6, in <module>
from .asynchronous import AsyncKernelClient # noqa
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\asynchronous\__init__.py", line 1, in <module>
from .client import AsyncKernelClient # noqa
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\asynchronous\client.py", line 6, in <module>
from jupyter_client.channels import HBChannel
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\channels.py", line 12, in <module>
import zmq.asyncio
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\__init__.py", line 125, in <module>
from zmq import backend
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\__init__.py", line 32, in <module>
raise original_error from None
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\select.py", line 32, in select_backend
mod = import_module(name)
File "C:\Users\fa125436\Miniconda3\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (
ImportError: cannot import name 'constants' from partially initialized module 'zmq.backend.cython' (most likely due to a circular import) (C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\cython\__init__.py)
Traceback (most recent call last):
File "C:\Users\fa125436\Miniconda3\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\fa125436\Miniconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\spyder_kernels\console\__main__.py", line 22, in <module>
from spyder_kernels.console import start
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\spyder_kernels\console\start.py", line 21, in <module>
import ipykernel
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\ipykernel\__init__.py", line 2, in <module>
from .connect import *
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\ipykernel\connect.py", line 10, in <module>
import jupyter_client
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\__init__.py", line 6, in <module>
from .asynchronous import AsyncKernelClient # noqa
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\asynchronous\__init__.py", line 1, in <module>
from .client import AsyncKernelClient # noqa
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\asynchronous\client.py", line 6, in <module>
from jupyter_client.channels import HBChannel
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\channels.py", line 12, in <module>
import zmq.asyncio
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\__init__.py", line 125, in <module>
from zmq import backend
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\__init__.py", line 32, in <module>
raise original_error from None
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\select.py", line 32, in select_backend
mod = import_module(name)
File "C:\Users\fa125436\Miniconda3\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (
ImportError: cannot import name 'constants' from partially initialized module 'zmq.backend.cython' (most likely due to a circular import) (C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\cython\__init__.py)
Traceback (most recent call last):
File "C:\Users\fa125436\Miniconda3\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\fa125436\Miniconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\spyder_kernels\console\__main__.py", line 22, in <module>
from spyder_kernels.console import start
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\spyder_kernels\console\start.py", line 21, in <module>
import ipykernel
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\ipykernel\__init__.py", line 2, in <module>
from .connect import *
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\ipykernel\connect.py", line 10, in <module>
import jupyter_client
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\__init__.py", line 6, in <module>
from .asynchronous import AsyncKernelClient # noqa
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\asynchronous\__init__.py", line 1, in <module>
from .client import AsyncKernelClient # noqa
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\asynchronous\client.py", line 6, in <module>
from jupyter_client.channels import HBChannel
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\channels.py", line 12, in <module>
import zmq.asyncio
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\__init__.py", line 125, in <module>
from zmq import backend
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\__init__.py", line 32, in <module>
raise original_error from None
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\select.py", line 32, in select_backend
mod = import_module(name)
File "C:\Users\fa125436\Miniconda3\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (
ImportError: cannot import name 'constants' from partially initialized module 'zmq.backend.cython' (most likely due to a circular import) (C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\cython\__init__.py)
Traceback (most recent call last):
File "C:\Users\fa125436\Miniconda3\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\fa125436\Miniconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\spyder_kernels\console\__main__.py", line 22, in <module>
from spyder_kernels.console import start
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\spyder_kernels\console\start.py", line 21, in <module>
import ipykernel
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\ipykernel\__init__.py", line 2, in <module>
from .connect import *
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\ipykernel\connect.py", line 10, in <module>
import jupyter_client
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\__init__.py", line 6, in <module>
from .asynchronous import AsyncKernelClient # noqa
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\asynchronous\__init__.py", line 1, in <module>
from .client import AsyncKernelClient # noqa
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\asynchronous\client.py", line 6, in <module>
from jupyter_client.channels import HBChannel
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\channels.py", line 12, in <module>
import zmq.asyncio
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\__init__.py", line 125, in <module>
from zmq import backend
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\__init__.py", line 32, in <module>
raise original_error from None
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\select.py", line 32, in select_backend
mod = import_module(name)
File "C:\Users\fa125436\Miniconda3\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (
ImportError: cannot import name 'constants' from partially initialized module 'zmq.backend.cython' (most likely due to a circular import) (C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\cython\__init__.py)
Traceback (most recent call last):
File "C:\Users\fa125436\Miniconda3\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\fa125436\Miniconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\spyder_kernels\console\__main__.py", line 22, in <module>
from spyder_kernels.console import start
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\spyder_kernels\console\start.py", line 21, in <module>
import ipykernel
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\ipykernel\__init__.py", line 2, in <module>
from .connect import *
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\ipykernel\connect.py", line 10, in <module>
import jupyter_client
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\__init__.py", line 6, in <module>
from .asynchronous import AsyncKernelClient # noqa
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\asynchronous\__init__.py", line 1, in <module>
from .client import AsyncKernelClient # noqa
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\asynchronous\client.py", line 6, in <module>
from jupyter_client.channels import HBChannel
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\channels.py", line 12, in <module>
import zmq.asyncio
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\__init__.py", line 125, in <module>
from zmq import backend
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\__init__.py", line 32, in <module>
raise original_error from None
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\select.py", line 32, in select_backend
mod = import_module(name)
File "C:\Users\fa125436\Miniconda3\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (
ImportError: cannot import name 'constants' from partially initialized module 'zmq.backend.cython' (most likely due to a circular import) (C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\cython\__init__.py)
Traceback (most recent call last):
File "C:\Users\fa125436\Miniconda3\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\fa125436\Miniconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\spyder_kernels\console\__main__.py", line 22, in <module>
from spyder_kernels.console import start
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\spyder_kernels\console\start.py", line 21, in <module>
import ipykernel
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\ipykernel\__init__.py", line 2, in <module>
from .connect import *
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\ipykernel\connect.py", line 10, in <module>
import jupyter_client
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\__init__.py", line 6, in <module>
from .asynchronous import AsyncKernelClient # noqa
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\asynchronous\__init__.py", line 1, in <module>
from .client import AsyncKernelClient # noqa
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\asynchronous\client.py", line 6, in <module>
from jupyter_client.channels import HBChannel
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\jupyter_client\channels.py", line 12, in <module>
import zmq.asyncio
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\__init__.py", line 125, in <module>
from zmq import backend
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\__init__.py", line 32, in <module>
raise original_error from None
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\select.py", line 32, in select_backend
mod = import_module(name)
File "C:\Users\fa125436\Miniconda3\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (
ImportError: cannot import name 'constants' from partially initialized module 'zmq.backend.cython' (most likely due to a circular import) (C:\Users\fa125436\AppData\Local\Programs\Spyder\pkgs\zmq\backend\cython\__init__.py)

Related

Error while install PySimpleGUI import ModuleNotFoundError: No module named 'Python'

There's an error when i tried to install PySimpleGUI package on PyCharm. i already tried install package from setting, and terminal with command "pip instal PySimpleGUI". Both of them have the same error message.
`Traceback (most recent call last):
File "C:\Users\irsya\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\irsya\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\irsya\PycharmProjects\pythonProject\venv\Scripts\pip.exe\__main__.py", line 4, in <module>
File "C:\Users\irsya\PycharmProjects\pythonProject\venv\lib\site-packages\pip\_internal\cli\main.py", line 9, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "C:\Users\irsya\PycharmProjects\pythonProject\venv\lib\site-packages\pip\_internal\cli\autocompletion.py", line 10, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "C:\Users\irsya\PycharmProjects\pythonProject\venv\lib\site-packages\pip\_internal\cli\main_parser.py", line 8, in <module>
from pip._internal.cli import cmdoptions
File "C:\Users\irsya\PycharmProjects\pythonProject\venv\lib\site-packages\pip\_internal\cli\cmdoptions.py", line 23, in <module>
from pip._internal.cli.parser import ConfigOptionParser
File "C:\Users\irsya\PycharmProjects\pythonProject\venv\lib\site-packages\pip\_internal\cli\parser.py", line 12, in <module>
from pip._internal.configuration import Configuration, ConfigurationError
File "C:\Users\irsya\PycharmProjects\pythonProject\venv\lib\site-packages\pip\_internal\configuration.py", line 20, in <module>
from pip._internal.exceptions import (
File "C:\Users\irsya\PycharmProjects\pythonProject\venv\lib\site-packages\pip\_internal\exceptions.py", line 7, in <module>
from pip._vendor.pkg_resources import Distribution
File "C:\Users\irsya\PycharmProjects\pythonProject\venv\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 22, in <module>
import Python.Bonus.parsers14
ModuleNotFoundError: No module named 'Python'
`
Errro message

ImportError about Numpy when using Manim

I want to try Manim.
So I installed (using pip) and created a project with the Quickstart tutorial.
RuntimeError, ImportError
But when running it, a bunch of errors show up:
RuntimeError: module compiled against API version 0xf but this version of NumPy is 0xe
Traceback (most recent call last):
File "C:\Users\mitja\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\mitja\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\mitja\AppData\Local\Programs\Python\Python310\Scripts\manim.exe\__main__.py", line 4, in <module>
File "C:\Users\mitja\AppData\Local\Programs\Python\Python310\lib\site-packages\manim\__init__.py", line 24, in <module>
from .animation.animation import *
File "C:\Users\mitja\AppData\Local\Programs\Python\Python310\lib\site-packages\manim\animation\animation.py", line 6, in <module>
from manim.mobject.opengl.opengl_mobject import OpenGLMobject
File "C:\Users\mitja\AppData\Local\Programs\Python\Python310\lib\site-packages\manim\mobject\opengl\opengl_mobject.py", line 17, in <module>
from manim.utils.bezier import integer_interpolate, interpolate
File "C:\Users\mitja\AppData\Local\Programs\Python\Python310\lib\site-packages\manim\utils\bezier.py", line 28, in <module>
from scipy import linalg
File "C:\Users\mitja\AppData\Local\Programs\Python\Python310\lib\site-packages\scipy\__init__.py", line 217, in __getattr__
return _importlib.import_module(f'scipy.{name}')
File "C:\Users\mitja\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\mitja\AppData\Local\Programs\Python\Python310\lib\site-packages\scipy\linalg\__init__.py", line 197, in <module>
from ._misc import *
File "C:\Users\mitja\AppData\Local\Programs\Python\Python310\lib\site-packages\scipy\linalg\_misc.py", line 3, in <module>
from .blas import get_blas_funcs
File "C:\Users\mitja\AppData\Local\Programs\Python\Python310\lib\site-packages\scipy\linalg\blas.py", line 213, in <module>
from scipy.linalg import _fblas
ImportError: numpy.core.multiarray failed to import
I've already tried reinstalling/upgrading the newest version.
How do I solve this and get it running?

Error: Traceback (most recent call last): while installing sckiti-learn package

While I was trying to install scikit-learn package, I got this error message:
Error: Traceback (most recent call last):
File "/snap/pycharm-professional/306/plugins/python/helpers/packaging_tool.py", line 73, in run_pip
runpy.run_module(module_name, run_name='__main__', alter_sys=True)
File "/usr/lib/python3.8/runpy.py", line 207, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/ryuke/PycharmProjects/pythonProject/venv/lib/python3.8/site-packages/pip/__main__.py", line 29, in <module>
from pip._internal.cli.main import main as _main
File "/home/ryuke/PycharmProjects/pythonProject/venv/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 9, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "/home/ryuke/PycharmProjects/pythonProject/venv/lib/python3.8/site-packages/pip/_internal/cli/autocompletion.py", line 10, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "/home/ryuke/PycharmProjects/pythonProject/venv/lib/python3.8/site-packages/pip/_internal/cli/main_parser.py", line 8, in <module>
from pip._internal.cli import cmdoptions
File "/home/ryuke/PycharmProjects/pythonProject/venv/lib/python3.8/site-packages/pip/_internal/cli/cmdoptions.py", line 23, in <module>
from pip._internal.cli.parser import ConfigOptionParser
File "/home/ryuke/PycharmProjects/pythonProject/venv/lib/python3.8/site-packages/pip/_internal/cli/parser.py", line 12, in <module>
from pip._internal.configuration import Configuration, ConfigurationError
File "/home/ryuke/PycharmProjects/pythonProject/venv/lib/python3.8/site-packages/pip/_internal/configuration.py", line 26, in <module>
from pip._internal.utils.logging import getLogger
File "/home/ryuke/PycharmProjects/pythonProject/venv/lib/python3.8/site-packages/pip/_internal/utils/logging.py", line 13, in <module>
from pip._internal.utils.misc import ensure_dir
File "/home/ryuke/PycharmProjects/pythonProject/venv/lib/python3.8/site-packages/pip/_internal/utils/misc.py", line 40, in <module>
from pip._internal.locations import get_major_minor_version, site_packages, user_site
File "/home/ryuke/PycharmProjects/pythonProject/venv/lib/python3.8/site-packages/pip/_internal/locations/__init__.py", line 14, in <module>
from . import _distutils, _sysconfig
File "/home/ryuke/PycharmProjects/pythonProject/venv/lib/python3.8/site-packages/pip/_internal/locations/_distutils.py", line 9, in <module>
from distutils.cmd import Command as DistutilsCommand
ModuleNotFoundError: No module named 'distutils.cmd'
Notice: I was following this stack overflow link Getting PyCharm to import sklearn

issue connecting to kernel in jupyter

Hi new to this so apologies if this has been asked before however I cant see a definitive way of fixing this.
I had installed a tensorflow environment as per the attached guide
https://priyanka-dandale.medium.com/how-to-create-a-tensorflow-environment-in-jupyter-notebook-and-use-it-e3815002c031
Seemed to install ok with no issues.
However when I went to use it cannot connect to the Kernel for some reason?
Error Message
Any assistance or things to try would be appreciated
To access the notebook, open this file in a browser:
file:///C:/Users/michael.burnett/AppData/Roaming/jupyter/runtime/nbserver-29156-open.html
Or copy and paste one of these URLs:
http://localhost:8889/?token=30cf96d443d97f7836bbeb7bf65388624076e1f0a51dc5f2
or http://127.0.0.1:8889/?token=30cf96d443d97f7836bbeb7bf65388624076e1f0a51dc5f2
[I 18:43:02.262 NotebookApp] Creating new notebook in
[I 18:43:05.968 NotebookApp] Kernel started: 7a742942-da07-4046-83cd-fb28cf7a20f2, name: tensorflow-environment
Traceback (most recent call last):
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\ipykernel_launcher.py", line 15, in <module>
from ipykernel import kernelapp as app
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\ipykernel\__init__.py", line 2, in <module>
from .connect import *
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\ipykernel\connect.py", line 18, in <module>
import jupyter_client
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\jupyter_client\__init__.py", line 4, in <module>
from .connect import *
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\jupyter_client\connect.py", line 21, in <module>
import zmq
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\__init__.py", line 50, in <module>
from zmq import backend
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: DLL load failed while importing error: The specified module could not be found.
[I 18:43:08.954 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
Traceback (most recent call last):
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\ipykernel_launcher.py", line 15, in <module>
from ipykernel import kernelapp as app
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\ipykernel\__init__.py", line 2, in <module>
from .connect import *
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\ipykernel\connect.py", line 18, in <module>
import jupyter_client
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\jupyter_client\__init__.py", line 4, in <module>
from .connect import *
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\jupyter_client\connect.py", line 21, in <module>
import zmq
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\__init__.py", line 50, in <module>
from zmq import backend
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: DLL load failed while importing error: The specified module could not be found.
[I 18:43:11.983 NotebookApp] KernelRestarter: restarting kernel (2/5), new random ports
Traceback (most recent call last):
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\ipykernel_launcher.py", line 15, in <module>
from ipykernel import kernelapp as app
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\ipykernel\__init__.py", line 2, in <module>
from .connect import *
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\ipykernel\connect.py", line 18, in <module>
import jupyter_client
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\jupyter_client\__init__.py", line 4, in <module>
from .connect import *
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\jupyter_client\connect.py", line 21, in <module>
import zmq
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\__init__.py", line 50, in <module>
from zmq import backend
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: DLL load failed while importing error: The specified module could not be found.
[I 18:43:14.996 NotebookApp] KernelRestarter: restarting kernel (3/5), new random ports
Traceback (most recent call last):
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\ipykernel_launcher.py", line 15, in <module>
from ipykernel import kernelapp as app
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\ipykernel\__init__.py", line 2, in <module>
from .connect import *
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\ipykernel\connect.py", line 18, in <module>
import jupyter_client
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\jupyter_client\__init__.py", line 4, in <module>
from .connect import *
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\jupyter_client\connect.py", line 21, in <module>
import zmq
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\__init__.py", line 50, in <module>
from zmq import backend
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: DLL load failed while importing error: The specified module could not be found.
[I 18:43:18.012 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
Traceback (most recent call last):
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\ipykernel_launcher.py", line 15, in <module>
from ipykernel import kernelapp as app
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\ipykernel\__init__.py", line 2, in <module>
from .connect import *
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\ipykernel\connect.py", line 18, in <module>
import jupyter_client
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\jupyter_client\__init__.py", line 4, in <module>
from .connect import *
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\jupyter_client\connect.py", line 21, in <module>
import zmq
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\__init__.py", line 50, in <module>
from zmq import backend
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\michael.burnett\.conda\envs\tensorflow-environment\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: DLL load failed while importing error: The specified module could not be found.
[W 18:43:21.049 NotebookApp] KernelRestarter: restart failed
[W 18:43:21.053 NotebookApp] Kernel 7a742942-da07-4046-83cd-fb28cf7a20f2 died, removing from map.
[W 18:44:05.905 NotebookApp] Timeout waiting for kernel_info reply from 7a742942-da07-4046-83cd-fb28cf7a20f2
[E 18:44:08.631 NotebookApp] Error opening stream: HTTP 404: Not Found (Kernel does not exist: 7a742942-da07-4046-83cd-fb28cf7a20f2)
[W 18:44:09.686 NotebookApp] 404 GET /api/kernels/7a742942-da07-4046-83cd-fb28cf7a20f2/channels?session_id=0ce1ed9df95442e4b070a5bd1da4b15c (::1): Kernel does not exist: 7a742942-da07-4046-83cd-fb28cf7a20f2
[W 18:44:09.712 NotebookApp] 404 GET /api/kernels/7a742942-da07-4046-83cd-fb28cf7a20f2/channels?session_id=0ce1ed9df95442e4b070a5bd1da4b15c (::1) 28.970000ms referer=None
[W 18:44:11.732 NotebookApp] Replacing stale connection: 7a742942-da07-4046-83cd-fb28cf7a20f2:0ce1ed9df95442e4b070a5bd1da4b15c
[I 18:45:06.031 NotebookApp] Saving file at /Untitled7.ipynb

Multiple Kernels in Python Jupyter Notebook

I currently have Python 3 installed and want to install Python 2.7 as a second kernel in Jupyter notebook. I was able to install Python 2.7, however, when I change kernels in Jupyter notebook, I receive the following error in the Anaconda command prompt:
[I 17:49:16.185 NotebookApp] Starting buffering for 069e4484-8d64-46e2-b62a-3588e46b4686:2857761af92f4e9387378c8162efbf40
[I 17:49:16.406 NotebookApp] Kernel shutdown: 069e4484-8d64-46e2-b62a-3588e46b4686
[I 17:49:16.453 NotebookApp] Kernel started: a9d7404d-02f1-4295-854d-0b11120cd3d2
Traceback (most recent call last):
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\ipykernel_launcher.py", line 15, in <module>
from ipykernel import kernelapp as app
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\ipykernel\__init__.py", line 2, in <module>
from .connect import *
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\ipykernel\connect.py", line 18, in <module>
import jupyter_client
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\jupyter_client\__init__.py", line 4, in <module>
from .connect import *
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\jupyter_client\connect.py", line 24, in <module>
import zmq
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\__init__.py", line 47, in <module>
from zmq import backend
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: DLL load failed: The specified module could not be found.
[I 17:49:19.462 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
Traceback (most recent call last):
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\ipykernel_launcher.py", line 15, in <module>
from ipykernel import kernelapp as app
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\ipykernel\__init__.py", line 2, in <module>
from .connect import *
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\ipykernel\connect.py", line 18, in <module>
import jupyter_client
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\jupyter_client\__init__.py", line 4, in <module>
from .connect import *
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\jupyter_client\connect.py", line 24, in <module>
import zmq
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\__init__.py", line 47, in <module>
from zmq import backend
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: DLL load failed: The specified module could not be found.
[I 17:49:22.484 NotebookApp] KernelRestarter: restarting kernel (2/5), new random ports
Traceback (most recent call last):
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\ipykernel_launcher.py", line 15, in <module>
from ipykernel import kernelapp as app
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\ipykernel\__init__.py", line 2, in <module>
from .connect import *
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\ipykernel\connect.py", line 18, in <module>
import jupyter_client
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\jupyter_client\__init__.py", line 4, in <module>
from .connect import *
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\jupyter_client\connect.py", line 24, in <module>
import zmq
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\__init__.py", line 47, in <module>
from zmq import backend
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: DLL load failed: The specified module could not be found.
[I 17:49:25.514 NotebookApp] KernelRestarter: restarting kernel (3/5), new random ports
Traceback (most recent call last):
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\ipykernel_launcher.py", line 15, in <module>
from ipykernel import kernelapp as app
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\ipykernel\__init__.py", line 2, in <module>
from .connect import *
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\ipykernel\connect.py", line 18, in <module>
import jupyter_client
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\jupyter_client\__init__.py", line 4, in <module>
from .connect import *
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\jupyter_client\connect.py", line 24, in <module>
import zmq
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\__init__.py", line 47, in <module>
from zmq import backend
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: DLL load failed: The specified module could not be found.
[I 17:49:28.529 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
Traceback (most recent call last):
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\ipykernel_launcher.py", line 15, in <module>
from ipykernel import kernelapp as app
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\ipykernel\__init__.py", line 2, in <module>
from .connect import *
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\ipykernel\connect.py", line 18, in <module>
import jupyter_client
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\jupyter_client\__init__.py", line 4, in <module>
from .connect import *
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\jupyter_client\connect.py", line 24, in <module>
import zmq
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\__init__.py", line 47, in <module>
from zmq import backend
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\Nick Alexander\Anaconda3\envs\py27\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: DLL load failed: The specified module could not be found.
[W 17:49:31.528 NotebookApp] KernelRestarter: restart failed
[W 17:49:31.528 NotebookApp] Kernel a9d7404d-02f1-4295-854d-0b11120cd3d2 died, removing from map.
All the python 2.7 installation files seem to be in the path specified by the error message. Thanks!
I'm not sure this solves your problem but try running
\path\to\your\install\of\python\python2.7 -m jupyter notebook
This will open jupyter in python2.7 hopefully
Do you have Anaconda installed?
With Anaconda you can easily create a new virtual environment with the desired python version:
conda create --name py27 python=2.7
will create a new environment with Python version 2.7.
conda create --name py37 python=3.7
will create a new environment with Python version 3.7.
This is the best way to use multiple Python releases on the same machine - in my opinion - furthermore you don't need to install any version of Python in your machine, Anaconda will do it for you.

Categories