An error ocurred while starting the kernel - spyder - python

An error ocurred while starting the kernel
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "C:\ProgramData\Anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\ProgramData\Anaconda3\lib\site‑packages\spyder_kernels\console_main.py", line 11, in
start.main()
File "C:\ProgramData\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 287, in main
import_spydercustomize()
File "C:\ProgramData\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 39, in import_spydercustomize
import spydercustomize
File "C:\ProgramData\Anaconda3\lib\site‑packages\spyder_kernels\customize\spydercustomize.py", line 27, in
from IPython.core.getipython import get_ipython
File "C:\ProgramData\Anaconda3\lib\site‑packages\IPython_init.py", line 54, in
from .core.application import Application
File "C:\ProgramData\Anaconda3\lib\site‑packages\IPython\core\application.py", line 23, in
from traitlets.config.application import Application, catch_config_error
File "C:\ProgramData\Anaconda3\lib\site‑packages\traitlets\config_init_.py", line 6, in
from .application import *
File "C:\ProgramData\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 19, in
from traitlets.config.configurable import Configurable, SingletonConfigurable
File "C:\ProgramData\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 12, in
from .loader import Config, LazyConfigValue, _is_section_key
File "C:\ProgramData\Anaconda3\lib\site‑packages\traitlets\config\loader.py", line 16, in
from ipython_genutils.path import filefind
File "C:\ProgramData\Anaconda3\lib\site‑packages\ipython_genutils\path.py", line 13, in
import random
File "C:\Users\VelammalM29\random.py", line 5, in
l1=eval(input("enter a list:"))
EOFError: EOF when reading a line

Related

Python cant import name 'FREQUENCIES' from 'charset_normalizer.assets'

firsttime poster on stack overflow. I wrote the following code:
import requests
from bs4 import BeautifulSoup
request=requests.get('https://www.bever.nl/p/msr-pocket-rocket-2-brander-MECCC70060.html?colour=658')
soup = BeautifulSoup(request.text, 'html.parser')
product_data = soup.find_all(class_='as-a-text as-a-text--s glossary-highlight')
product_weight = 0
for x in range(len(product_data)):
if 'Gewicht (g)' in product_data[x]:
product_weight = int(product_data[x+1].text)
print(product_weight)
But the console throws the following error:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Joop_\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\Joop_\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "c:\Users\Joop_\.vscode\extensions\ms-python.python-2022.8.1\pythonFiles\lib\python\debugpy\__main__.py", line 45, in <module>
cli.main()
File "c:\Users\Joop_\.vscode\extensions\ms-python.python-2022.8.1\pythonFiles\lib\python\debugpy/..\debugpy\server\cli.py", line 444, in main
run()
File "c:\Users\Joop_\.vscode\extensions\ms-python.python-2022.8.1\pythonFiles\lib\python\debugpy/..\debugpy\server\cli.py", line 285, in run_file
runpy.run_path(target_as_str, run_name=compat.force_str("__main__"))
File "C:\Users\Joop_\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 289, in run_path
return _run_module_code(code, init_globals, run_name,
File "C:\Users\Joop_\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 96, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "C:\Users\Joop_\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "c:\Users\Joop_\AppData\Local\Programs\Python\Python310\Projects\Bever script.py", line 1, in <module>
import requests
File "C:\Users\Joop_\AppData\Roaming\Python\Python310\site-packages\requests\__init__.py", line 45, in <module>
from .exceptions import RequestsDependencyWarning
File "C:\Users\Joop_\AppData\Roaming\Python\Python310\site-packages\requests\exceptions.py", line 9, in <module>
from .compat import JSONDecodeError as CompatJSONDecodeError
File "C:\Users\Joop_\AppData\Roaming\Python\Python310\site-packages\requests\compat.py", line 13, in <module>
import charset_normalizer as chardet
File "C:\Users\Joop_\AppData\Roaming\Python\Python310\site-packages\charset_normalizer\__init__.py", line 24, in <module>
from .api import from_bytes, from_fp, from_path, normalize
File "C:\Users\Joop_\AppData\Roaming\Python\Python310\site-packages\charset_normalizer\api.py", line 10, in <module>
from .cd import (
File "C:\Users\Joop_\AppData\Roaming\Python\Python310\site-packages\charset_normalizer\cd.py", line 7, in <module>
from .assets import FREQUENCIES
ImportError: cannot import name 'FREQUENCIES' from 'charset_normalizer.assets' (unknown location)
I'm pretty new to Python and I have no idea what's causing this problem. I have tried to reimport the modules, and I've even uninstalled python and reinstalled it. I have also tried to repair python using the installer.
It seems like this issue.
Check your pythonPath and recreat pipenv.

"TypeError" after running "brownie --version" command

Please I am getting this error after installing brownie using pipx. I tried running "brownie --version" and I got the error below. can someone assist in resolving this pls? The python version on my system is upto date but I observed when I installed brownie, it showed an old version.
C:\Users\OGIDAN TOLU>brownie --version
INFO: Could not find files for the given pattern(s).
Traceback (most recent call last):
File "C:\Users\OGIDAN TOLU\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\OGIDAN TOLU\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "c:\users\ogidan tolu\.local\bin\brownie.exe\__main__.py", line 4, in <module>
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\__init__.py", line 6, in <module>
from brownie.project import compile_source, run
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\project\__init__.py", line 3, in <module>
from .main import ( # NOQA 401
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\project\main.py", line 41, in <module>
from brownie.network import web3
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\__init__.py", line 4, in <module>
from .account import Accounts
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\account.py", line 29, in <module>
from .gas.bases import GasABC
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\gas\bases.py", line 7, in <module>
from brownie.network.web3 import web3
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\web3.py", line 208, in <module>
web3 = Web3()
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\web3.py", line 30, in __init__
self.enable_unstable_package_management_api()
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\web3\main.py", line 289, in enable_unstable_package_management_api
from web3.pm import PM # noqa: F811
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\web3\pm.py", line 36, in <module>
from ethpm import (
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ethpm\__init__.py", line 8, in <module>
from .package import Package # noqa: F401
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ethpm\package.py", line 60, in <module>
from ethpm.uri import (
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ethpm\uri.py", line 15, in <module>
from ethpm._utils.backend import (
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ethpm\_utils\backend.py", line 13, in <module>
from ipfshttpclient.exceptions import (
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ipfshttpclient\__init__.py", line 11, in <module>
from .client import DEFAULT_ADDR, DEFAULT_BASE
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ipfshttpclient\client\__init__.py", line 21, in <module>
from . import bitswap
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ipfshttpclient\client\bitswap.py", line 3, in <module>
from . import base
File "C:\Users\OGIDAN TOLU\.local\pipx\venvs\eth-brownie\lib\site-packages\ipfshttpclient\client\base.py", line 274, in <module>
def returns_no_item(func: _inner_func_t[ty.NoReturn]) -> _returns_single_wrapper_t:
File "C:\Users\OGIDAN TOLU\AppData\Local\Programs\Python\Python37\lib\typing.py", line 251, in inner
return func(*args, **kwds)
File "C:\Users\OGIDAN TOLU\AppData\Local\Programs\Python\Python37\lib\typing.py", line 824, in __class_getitem__
params = tuple(_type_check(p, msg) for p in params)
File "C:\Users\OGIDAN TOLU\AppData\Local\Programs\Python\Python37\lib\typing.py", line 824, in <genexpr>
params = tuple(_type_check(p, msg) for p in params)
File "C:\Users\OGIDAN TOLU\AppData\Local\Programs\Python\Python37\lib\typing.py", line 135, in _type_check
raise TypeError(f"Plain {arg} is not valid as type argument")
TypeError: Plain typing.NoReturn is not valid as type argument

I can't run a script python in Ubuntu

I want to install this script( https://github.com/SpEcHiDe/AnyDLBot)
on my server, but I was surprised that I cannot run any Python script and this error message appears to me every time I run the Python script :
(VENV) root#Hermania:/datadrive/AnyDLBot# python3 -m anydlbot Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/datadrive/AnyDLBot/anydlbot/__main__.py", line 8, in <module>
from pyrogram import Client
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/__init__.py", line 23, in <module>
from .client import *
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/__init__.py", line 19, in <module>
from .client import Client
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/client.py", line 40, in <module>
from pyrogram.client.methods.password.utils import compute_check
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/methods/__init__.py", line 19, in <module>
from .bots import Bots
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/methods/bots/__init__.py", line 19, in <module>
from .answer_callback_query import AnswerCallbackQuery
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/methods/bots/answer_callback_query.py", line 20, in <module>
from pyrogram.client.ext import BaseClient
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/ext/__init__.py", line 19, in <module>
from .base_client import BaseClient
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/ext/base_client.py", line 28, in <module>
from ..parser import Parser
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/parser/__init__.py", line 19, in <module>
from .parser import Parser
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/parser/parser.py", line 23, in <module>
from .html import HTML
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/parser/html.py", line 109, in <module>
class HTML:
File "/datadrive/AnyDLBot/VENV/lib/python3.5/site-packages/pyrogram/client/parser/html.py", line 110, in HTML
def __init__(self, client: Union["pyrogram.BaseClient", None]):
File "/usr/lib/python3.5/typing.py", line 552, in __getitem__
dict(self.__dict__), parameters, _root=True)
File "/usr/lib/python3.5/typing.py", line 512, in __new__
for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
File "/usr/lib/python3.5/typing.py", line 512, in <genexpr>
for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
File "/usr/lib/python3.5/typing.py", line 190, in __subclasscheck__
self._eval_type(globalns, localns)
File "/usr/lib/python3.5/typing.py", line 177, in _eval_type
eval(self.__forward_code__, globalns, localns),
File "<string>", line 1, in <module>
AttributeError: module 'pyrogram' has no attribute 'BaseClient'
For your information, I changed versions of Python, but I faced the same problem ☹️☹️☹️☹️☹️☹️

Jupyter Notebook won't run python 3 - import pygments error

New to Anaconda and Jupyter Notebooks but for some reason I can't run Jupyter Notebook in my environments running python 3. Every time my terminal displays this:
Traceback (most recent call last):
File "/anaconda3/bin/jupyter-notebook", line 11, in
sys.exit(main())
File "/anaconda3/lib/python3.6/site-packages/jupyter_core/application.py", line 267, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/anaconda3/lib/python3.6/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/anaconda3/lib/python3.6/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1296, in initialize
self.init_webapp()
File "/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1093, in init_webapp
self.jinja_environment_options
File "/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 167, in init
default_url, settings_overrides, jinja_env_options)
File "/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 259, in init_settings
nbextensions_path=jupyter_app.nbextensions_path,
File "/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 807, in nbextensions_path
from IPython.paths import get_ipython_dir
File "/anaconda3/lib/python3.6/site-packages/IPython/init.py", line 54, in
from .core.application import Application
File "/anaconda3/lib/python3.6/site-packages/IPython/core/application.py", line 25, in
from IPython.core import release, crashhandler
File "/anaconda3/lib/python3.6/site-packages/IPython/core/crashhandler.py", line 27, in
from IPython.core import ultratb
File "/anaconda3/lib/python3.6/site-packages/IPython/core/ultratb.py", line 115, in
from IPython.core import debugger
File "/anaconda3/lib/python3.6/site-packages/IPython/core/debugger.py", line 37, in
from IPython.utils import PyColorize
File "/anaconda3/lib/python3.6/site-packages/IPython/utils/PyColorize.py", line 47, in
from .colorable import Colorable
File "/anaconda3/lib/python3.6/site-packages/IPython/utils/colorable.py", line 12, in
import pygments
File "/Library/Python/2.7/site-packages/pygments/init.py", line 46
except TypeError, err:
^
SyntaxError: invalid syntax
Any recommendations on how to correct?

Spyder :An error ocurred while starting the kernel

I am still getting this error: An error occurred while starting the kernel
Things I tried:
setuptools command
updating spyder
Uninstalled everything that had word python in it from Uninstall or change progam panel
Uninstalling and reinstalling anaconda
Reading people's response on how they tried to fix it
Tried not to get frustrated.
This started occurring after I updated the spyder which I shouldn't have, but now I am stuck with the issue. I will share the complete message that's coming up on my IPhython Console screen.
Traceback (most recent call last):
File "C:\Users\afsan\Anaconda3\lib\site‑packages\spyder\utils\ipython\start_kernel.py", line 245, in
main()
File "C:\Users\afsan\Anaconda3\lib\site‑packages\spyder\utils\ipython\start_kernel.py", line 213, in main
from ipykernel.kernelapp import IPKernelApp
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\ipykernel\__init__.py", line 2, in
from .connect import *
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\ipykernel\connect.py", line 18, in
import jupyter_client
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\jupyter_client\__init__.py", line 4, in
from .connect import *
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\jupyter_client\connect.py", line 22, in
import zmq
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\__init__.py", line 34, in
from zmq import backend
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\backend\__init__.py", line 40, in
reraise(*exc_info)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\backend\__init__.py", line 27, in
_ns = select_backend(first)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\backend\select.py", line 26, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\backend\cython\__init__.py", line 6, in
from . import (constants, error, message, context,
ImportError: cannot import name 'constants'
Traceback (most recent call last):
File "C:\Users\afsan\Anaconda3\lib\site‑packages\spyder\utils\ipython\start_kernel.py", line 245, in
main()
File "C:\Users\afsan\Anaconda3\lib\site‑packages\spyder\utils\ipython\start_kernel.py", line 213, in main
from ipykernel.kernelapp import IPKernelApp
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\ipykernel\__init__.py", line 2, in
from .connect import *
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\ipykernel\connect.py", line 18, in
import jupyter_client
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\jupyter_client\__init__.py", line 4, in
from .connect import *
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\jupyter_client\connect.py", line 22, in
import zmq
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\__init__.py", line 34, in
from zmq import backend
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\backend\__init__.py", line 40, in
reraise(*exc_info)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\backend\__init__.py", line 27, in
_ns = select_backend(first)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\backend\select.py", line 26, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\backend\cython\__init__.py", line 6, in
from . import (constants, error, message, context,
ImportError: cannot import name 'constants'
Traceback (most recent call last):
File "C:\Users\afsan\Anaconda3\lib\site‑packages\spyder\utils\ipython\start_kernel.py", line 245, in
main()
File "C:\Users\afsan\Anaconda3\lib\site‑packages\spyder\utils\ipython\start_kernel.py", line 213, in main
from ipykernel.kernelapp import IPKernelApp
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\ipykernel\__init__.py", line 2, in
from .connect import *
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\ipykernel\connect.py", line 18, in
import jupyter_client
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\jupyter_client\__init__.py", line 4, in
from .connect import *
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\jupyter_client\connect.py", line 22, in
import zmq
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\__init__.py", line 34, in
from zmq import backend
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\backend\__init__.py", line 40, in
reraise(*exc_info)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\backend\__init__.py", line 27, in
_ns = select_backend(first)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\backend\select.py", line 26, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\backend\cython\__init__.py", line 6, in
from . import (constants, error, message, context,
ImportError: cannot import name 'constants'
Traceback (most recent call last):
File "C:\Users\afsan\Anaconda3\lib\site‑packages\spyder\utils\ipython\start_kernel.py", line 245, in
main()
File "C:\Users\afsan\Anaconda3\lib\site‑packages\spyder\utils\ipython\start_kernel.py", line 213, in main
from ipykernel.kernelapp import IPKernelApp
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\ipykernel\__init__.py", line 2, in
from .connect import *
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\ipykernel\connect.py", line 18, in
import jupyter_client
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\jupyter_client\__init__.py", line 4, in
from .connect import *
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\jupyter_client\connect.py", line 22, in
import zmq
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\__init__.py", line 34, in
from zmq import backend
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\backend\__init__.py", line 40, in
reraise(*exc_info)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\backend\__init__.py", line 27, in
_ns = select_backend(first)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\backend\select.py", line 26, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\backend\cython\__init__.py", line 6, in
from . import (constants, error, message, context,
ImportError: cannot import name 'constants'
Traceback (most recent call last):
File "C:\Users\afsan\Anaconda3\lib\site‑packages\spyder\utils\ipython\start_kernel.py", line 245, in
main()
File "C:\Users\afsan\Anaconda3\lib\site‑packages\spyder\utils\ipython\start_kernel.py", line 213, in main
from ipykernel.kernelapp import IPKernelApp
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\ipykernel\__init__.py", line 2, in
from .connect import *
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\ipykernel\connect.py", line 18, in
import jupyter_client
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\jupyter_client\__init__.py", line 4, in
from .connect import *
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\jupyter_client\connect.py", line 22, in
import zmq
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\__init__.py", line 34, in
from zmq import backend
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\backend\__init__.py", line 40, in
reraise(*exc_info)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\backend\__init__.py", line 27, in
_ns = select_backend(first)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\backend\select.py", line 26, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\afsan\AppData\Local\Programs\Python\Python36󈛄\Lib\site‑packages\zmq\backend\cython\__init__.py", line 6, in
from . import (constants, error, message, context,
ImportError: cannot import name 'constants'
The problem is that you have two Python versions installed:
C:\Users\afsan\Anaconda3\
C:\Users\afsan\AppData\Local\Programs\Python\Python36
Given that it seems you want to use Spyder with Anaconda, please remove your second Python version (manually, if necessary). That should fix your problem.

Categories

Resources