Closed Yaozuwu closed 6 years ago
I'm a noob, maybe not describe this problem clearly.
Thanks for reporting. Try running the following from the Anaconda prompt or reinstalling Anaconda
conda update spyder ipykernel tornado pyzmq
Also, Please try the steps listed in the Spyder Troubleshooting Guide, specifically the Basic First Aid and Emergency CPR sections, which resolve the great majority of Spyder installation issues.
If it still isn't working, please describe in detail the circumstances in which the error occurred, and post the information listed in relevant subsection of the Calling for Help section as a comment to this issue, and we'll try to help if we can. Otherwise, your issue will likely have to be closed after one week (7 days). Thanks, and best of luck!
got it, Thank you.
I take it that fixed it?
yep
An error ocurred while starting the kernel Traceback (most recent call last): File "C:\Users\HP\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Users\HP\Anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\HP\Anaconda3\lib\site‑packages\spyder_kernels\console__main.py", line 11, in start.main() File "C:\Users\HP\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 272, in main import_spydercustomize() File "C:\Users\HP\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 32, in import_spydercustomize import spydercustomize File "C:\Users\HP\Anaconda3\lib\site‑packages\spyder_kernels\customize\spydercustomize.py", line 25, in from IPython.core.getipython import get_ipython File "C:\Users\HP\Anaconda3\lib\site‑packages\IPython__init.py", line 54, in from .core.application import Application File "C:\Users\HP\Anaconda3\lib\site‑packages\IPython\core\application.py", line 23, in from traitlets.config.application import Application, catch_config_error File "C:\Users\HP\Anaconda3\lib\site‑packages\traitlets\config\init__.py", line 6, in from .application import * File "C:\Users\HP\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 19, in from traitlets.config.configurable import Configurable, SingletonConfigurable File "C:\Users\HP\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 12, in from .loader import Config, LazyConfigValue, _is_section_key File "C:\Users\HP\Anaconda3\lib\site‑packages\traitlets\config\loader.py", line 16, in from ipython_genutils.path import filefind File "C:\Users\HP\Anaconda3\lib\site‑packages\ipython_genutils\path.py", line 13, in import random File "C:\Users\HP\random.py", line 4, in import pyttsx3 ModuleNotFoundError: No module named 'pyttsx3' Traceback (most recent call last): File "C:\Users\HP\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Users\HP\Anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\HP\Anaconda3\lib\site‑packages\spyder_kernels\console__main.py", line 11, in start.main() File "C:\Users\HP\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 272, in main import_spydercustomize() File "C:\Users\HP\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 32, in import_spydercustomize import spydercustomize File "C:\Users\HP\Anaconda3\lib\site‑packages\spyder_kernels\customize\spydercustomize.py", line 25, in from IPython.core.getipython import get_ipython File "C:\Users\HP\Anaconda3\lib\site‑packages\IPython\init.py", line 54, in from .core.application import Application File "C:\Users\HP\Anaconda3\lib\site‑packages\IPython\core\application.py", line 23, in from traitlets.config.application import Application, catch_config_error File "C:\Users\HP\Anaconda3\lib\site‑packages\traitlets\config\init__.py", line 6, in from .application import * File "C:\Users\HP\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 19, in from traitlets.config.configurable import Configurable, SingletonConfigurable File "C:\Users\HP\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 12, in from .loader import Config, LazyConfigValue, _is_section_key File "C:\Users\HP\Anaconda3\lib\site‑packages\traitlets\config\loader.py", line 16, in from ipython_genutils.path import filefind File "C:\Users\HP\Anaconda3\lib\site‑packages\ipython_genutils\path.py", line 13, in import random File "C:\Users\HP\random.py", line 4, in import pyttsx3 ModuleNotFoundError: No module named 'pyttsx3' Traceback (most recent call last): File "C:\Users\HP\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Users\HP\Anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\HP\Anaconda3\lib\site‑packages\spyder_kernels\console__main.py", line 11, in start.main() File "C:\Users\HP\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 272, in main import_spydercustomize() File "C:\Users\HP\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 32, in import_spydercustomize import spydercustomize File "C:\Users\HP\Anaconda3\lib\site‑packages\spyder_kernels\customize\spydercustomize.py", line 25, in from IPython.core.getipython import get_ipython File "C:\Users\HP\Anaconda3\lib\site‑packages\IPython\init.py", line 54, in from .core.application import Application File "C:\Users\HP\Anaconda3\lib\site‑packages\IPython\core\application.py", line 23, in from traitlets.config.application import Application, catch_config_error File "C:\Users\HP\Anaconda3\lib\site‑packages\traitlets\config\init__.py", line 6, in from .application import * File "C:\Users\HP\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 19, in from traitlets.config.configurable import Configurable, SingletonConfigurable File "C:\Users\HP\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 12, in from .loader import Config, LazyConfigValue, _is_section_key File "C:\Users\HP\Anaconda3\lib\site‑packages\traitlets\config\loader.py", line 16, in from ipython_genutils.path import filefind File "C:\Users\HP\Anaconda3\lib\site‑packages\ipython_genutils\path.py", line 13, in import random File "C:\Users\HP\random.py", line 4, in import pyttsx3 ModuleNotFoundError: No module named 'pyttsx3' Traceback (most recent call last): File "C:\Users\HP\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Users\HP\Anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\HP\Anaconda3\lib\site‑packages\spyder_kernels\console__main.py", line 11, in start.main() File "C:\Users\HP\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 272, in main import_spydercustomize() File "C:\Users\HP\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 32, in import_spydercustomize import spydercustomize File "C:\Users\HP\Anaconda3\lib\site‑packages\spyder_kernels\customize\spydercustomize.py", line 25, in from IPython.core.getipython import get_ipython File "C:\Users\HP\Anaconda3\lib\site‑packages\IPython\init.py", line 54, in from .core.application import Application File "C:\Users\HP\Anaconda3\lib\site‑packages\IPython\core\application.py", line 23, in from traitlets.config.application import Application, catch_config_error File "C:\Users\HP\Anaconda3\lib\site‑packages\traitlets\config\init__.py", line 6, in from .application import * File "C:\Users\HP\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 19, in from traitlets.config.configurable import Configurable, SingletonConfigurable File "C:\Users\HP\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 12, in from .loader import Config, LazyConfigValue, _is_section_key File "C:\Users\HP\Anaconda3\lib\site‑packages\traitlets\config\loader.py", line 16, in from ipython_genutils.path import filefind File "C:\Users\HP\Anaconda3\lib\site‑packages\ipython_genutils\path.py", line 13, in import random File "C:\Users\HP\random.py", line 4, in import pyttsx3 ModuleNotFoundError: No module named 'pyttsx3' Traceback (most recent call last): File "C:\Users\HP\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main "main__", mod_spec) File "C:\Users\HP\Anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\HP\Anaconda3\lib\site‑packages\spyder_kernels\console__main.py", line 11, in start.main() File "C:\Users\HP\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 272, in main import_spydercustomize() File "C:\Users\HP\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 32, in import_spydercustomize import spydercustomize File "C:\Users\HP\Anaconda3\lib\site‑packages\spyder_kernels\customize\spydercustomize.py", line 25, in from IPython.core.getipython import get_ipython File "C:\Users\HP\Anaconda3\lib\site‑packages\IPython\init.py", line 54, in from .core.application import Application File "C:\Users\HP\Anaconda3\lib\site‑packages\IPython\core\application.py", line 23, in from traitlets.config.application import Application, catch_config_error File "C:\Users\HP\Anaconda3\lib\site‑packages\traitlets\config\init__.py", line 6, in from .application import * File "C:\Users\HP\Anaconda3\lib\site‑packages\traitlets\config\application.py", line 19, in from traitlets.config.configurable import Configurable, SingletonConfigurable File "C:\Users\HP\Anaconda3\lib\site‑packages\traitlets\config\configurable.py", line 12, in from .loader import Config, LazyConfigValue, _is_section_key File "C:\Users\HP\Anaconda3\lib\site‑packages\traitlets\config\loader.py", line 16, in from ipython_genutils.path import filefind File "C:\Users\HP\Anaconda3\lib\site‑packages\ipython_genutils\path.py", line 13, in import random File "C:\Users\HP\random.py", line 4, in import pyttsx3 ModuleNotFoundError: No module named 'pyttsx3'
Spyder:3 Python: 2.7 and 3.7 Operating System: win 10
@sumitroy630 As is clear from the traceback, this issue has nothing to do with this old, closed issue that was evidently due to user error or a machine/install/environment-specific problem. If the items in the troubleshooting guide (mentioned in my comment above) don't help and you go through the steps in the issue checklist without success, then consider posting a new issue. Thanks, and best of luck!
@sumitroy630, the error you posted above is caused by this file
C:\Users\HP\random.py
Please remove it or rename it to something other than random.py
and your problem will be fixed.
Hi,
It amazes me how clueless the people are that both "contribute" to the building of these packages like Anaconda and offer help. Right out of the installation box, after installing Anaconda the spyder console is not working. Then I see about a dozen of "fixes" none of which worked.
I worked in IT for over 20 years and "worse than useless" is how I describe the vast majority of those supposed well meaning people. The would be tossed out the door.
@glendemasrco You seem very frustrated right now, and I'm sorry you're apparently having such a bad time with your Anaconda installation. We all say things in the heat of the moment we later regret, myself as no exception; if you've worked in the user-facing side of the IT world, you've probably experienced at least a few situations of a user getting unreasonably due to a problem you have no direct control over.
In fact, Spyder has no formal relationship (financial or otherwise) with Anaconda, and we have no direct control over your installation, machine, or the third-party dependencies upon which Spyder relies. We are an entirely community-run project; everyone you see providing help and support to users connected to Spyder is a volunteer member of the Spyder community doing it in their free time. As an IT professional yourself, if you've worked a significant amount helping inexperienced users, perhaps you can understand the time we waste and the frustration we sometimes feel answering the same questions and resolving the same problems dozens of times per day from the users who (unlike yourself) choose not to put in the minimal effort to search for their issue, update Spyder and consult our clearly linked troubleshooting resources.
With regard to your problem "the spyder console is not working" is perhaps the most general problem description there is for Spyder (second only to the application itself not launching) and can have a myriad of causes, from an issue with a third-party dependency, to a corrupted installation, to a quirk of your machine, OS or drivers, to simple user error. Naturally, each of these many and varied underlying issues has their own specific solutions, and therefore it should not be surprising that a solution to one user's specific problem won't work if the underlying cause of another's problem is different.
For example, the two issues reported in this thread, despite looking outwardly similar to the untrained eye, were caused by totally different things—one a conflict/bug with third-party-dependencies, and one a user error, both of which we were able to correctly diagnose from the detailed tracebacks those users provided. To compare it to something you're more likely familiar with, it would be like a user complaining that a number of solutions posted in a specific help thread for their internet not working (e.g. reboot router, check cables, disable firewall, etc) didn't work, when their specific problem happened to be e.g. with their modem firmware or due to malware, etc).
So, in order to provide help that is properly useful, you'll need to provide much more information about your problem, something I'm sure you're familiar with coming from IT. Specifically, we need the information requested in the issue template you see above: the full, exact text of your traceback or error message, your OS/Spyder/Python/Qt versions (e.g. from Help > About Spyder), the versions of your key dependencies (Help > Dependencies), and exactly what steps you've already tried. Also, what version of Anaconda you just installed would be helpful as well. Thanks.
Traceback (most recent call last):
File "C:\ana\lib\site‑packages\spyder\plugins\ipythonconsole.py", line 1525, in create_kernel_manager_and_kernel_client
config=None, autorestart=True)
File "C:\ana\lib\site‑packages\traitlets\traitlets.py", line 958, in __new__
inst.setup_instance(*args, **kwargs)
File "C:\ana\lib\site‑packages\traitlets\traitlets.py", line 986, in setup_instance
super(HasTraits, self).setup_instance(*args, **kwargs)
File "C:\ana\lib\site‑packages\traitlets\traitlets.py", line 977, in setup_instance
value.instance_init(self)
File "C:\ana\lib\site‑packages\traitlets\traitlets.py", line 1691, in instance_init
self._resolve_classes()
File "C:\ana\lib\site‑packages\traitlets\traitlets.py", line 1696, in _resolve_classes
self.klass = self._resolve_string(self.klass)
File "C:\ana\lib\site‑packages\traitlets\traitlets.py", line 1507, in _resolve_string
return import_item(string)
File "C:\ana\lib\site‑packages\traitlets\utils\importstring.py", line 34, in import_item
module = __import__(package, fromlist=[obj])
File "C:\ana\lib\site‑packages\jupyter_client\session.py", line 61, in
from jupyter_client.jsonutil import extract_dates, squash_dates, date_default
File "C:\ana\lib\site‑packages\jupyter_client\jsonutil.py", line 11, in
from dateutil.parser import parse as _dateutil_parse
File "C:\ana\lib\site‑packages\dateutil\parser.py", line 158
l.append("%s=%s" % (attr, `value`))
^
SyntaxError: invalid syntax
Same issue while starting Kernel after updating Spyder to latest version 3.3.1
@omarsalimwaller Yet again, this is not the same issue. Next time, please check at least the last few lines of the traceback to make sure they match the one in the original post; in your case, essentially every single line is different.
This is a duplicate of e.g. #7161 and is likely due to a very old version of one of Spyder's third party dependencies. It should be fixed by running conda update python-dateutil
in the Anaconda prompt. If that doesn't do it, reinstalling Anaconda should fix it.
Will do, thanks!
Hello experts, this problem can you solve it? annaconda 3.6.5 ubuntu 18.04 An error ocurred while starting the kernel 2019 20:02:06.511694: W tensorflow/core/framework/allocator.cc:113] Allocation of 1899703296 exceeds 10% of system memory. 2019 20:02:13.200504: W tensorflow/core/framework/allocator.cc:113] Allocation of 1899703296 exceeds 10% of system memory. 2019 20:02:13.811418: W tensorflow/core/framework/allocator.cc:113] Allocation of 1899703296 exceeds 10% of system memory. 2019 20:02:28.410150: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA 2019 20:02:28.597828: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:964] successful NUMA node read from SysFS had negative value (), but there must be at least one NUMA node, so returning NUMA node zero 2019 20:02:28.598603: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1411] Found device 0 with properties: name: GeForce GTX 1080 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.582 pciBusID: 0000:01:00.0 totalMemory: 10.91GiB freeMemory: 10.31GiB 2019 20:02:28.598621: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1490] Adding visible gpu devices: 0 2019 20:02:29.411584: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] Device interconnect StreamExecutor with strength 1 edge matrix: 2019 20:02:29.411618: I tensorflow/core/common_runtime/gpu/gpu_device.cc:977] 0 2019 20:02:29.411624: I tensorflow/core/common_runtime/gpu/gpu_device.cc:990] 0: N 2019 20:02:29.413201: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1103] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10057 MB memory) ‑> physical GPU (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1)
@AriseYY Like every other error posted to this thread, this one has nothing to do with the one reported here, as every line of the traceback is completely different. Its not clear what the error message actually is, but at least given everything shown there, there is nothing to indicate any problem with Spyder and rather it seems the error is with TensorFlow and thus it needs to be fixed on their end (or more likely yours). Is that the complete error message.
annaconda 3.6.5
3.6.5
is presumably your Python version, not your "annaconda" [sic] version.
An error ocurred while starting the kernel Traceback (most recent call last): File "C:\Users\Malli\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Users\Malli\Anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\Malli\Anaconda3\lib\site‑packages\spyder_kernels\console__main__.py", line 11, in start.main() File "C:\Users\Malli\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 279, in main import_spydercustomize() File "C:\Users\Malli\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 39, in import_spydercustomize import spydercustomize File "C:\Users\Malli\Anaconda3\lib\site‑packages\spyder_kernels\customize\spydercustomize.py", line 19, in import pdb File "C:\Users\Malli\Anaconda3\lib\pdb.py", line 73, in import cmd File "C:\Users\Malli\Anaconda3\lib\cmd.py", line 50, in IDENTCHARS = string.asciiletters + string.digits + '' AttributeError: module 'string' has no attribute 'ascii_letters'
An error ocurred while starting the kernel The error is:
Traceback (most recent call last): File "E:\anaconda3\envs\python2\lib\site‑packages\spyder\plugins\ipythonconsole.py", line 1562, in create_kernel_manager_and_kernel_client config=None, autorestart=True) File "E:\anaconda3\envs\python2\lib\site‑packages\traitlets\config\configurable.py", line 73, in init super(Configurable, self).init(**kwargs) File "E:\anaconda3\envs\python2\lib\site‑packages\traitlets\traitlets.py", line 997, in init setattr(self, key, value) File "E:\anaconda3\envs\python2\lib\site‑packages\traitlets\traitlets.py", line 585, in set self.set(obj, value) File "E:\anaconda3\envs\python2\lib\site‑packages\traitlets\traitlets.py", line 559, in set new_value = self._validate(obj, value) File "E:\anaconda3\envs\python2\lib\site‑packages\traitlets\traitlets.py", line 591, in _validate value = self.validate(obj, value) File "E:\anaconda3\envs\python2\lib\site‑packages\traitlets\traitlets.py", line 2053, in validate raise TraitError(msg.format(value, self.name, class_of(obj))) TraitError: Could not decode 'C:\Users\\xd0\xa1\xca\xaf\xcd\xb7\AppData\Roaming\jupyter\runtime\kernel�d9332221.json' for unicode trait 'connection_file' of a QtKernelManager instance.
@gaoleicsu, you need to rename your Users directory to something that doesn't have non-ascii characters (i.e. latin letters or numbers with no spaces).
An error ocurred while starting the kernel The error is:
Traceback (most recent call last): File "C:\Users\RISHAV\Anaconda3\lib\site‑packages\spyder\plugins\ipythonconsole.py", line 1572, in create_kernel_manager_and_kernel_client kernel_manager.start_kernel(stderr=stderr_handle) File "C:\Users\RISHAV\Anaconda3\lib\site‑packages\jupyter_client\manager.py", line 240, in start_kernel self.write_connection_file() File "C:\Users\RISHAV\Anaconda3\lib\site‑packages\jupyter_client\connect.py", line 547, in write_connection_file kernel_name=self.kernel_name File "C:\Users\RISHAV\Anaconda3\lib\site‑packages\jupyter_client\connect.py", line 212, in write_connection_file with secure_write(fname) as f: File "C:\Users\RISHAV\Anaconda3\lib\contextlib.py", line 112, in enter return next(self.gen) File "C:\Users\RISHAV\Anaconda3\lib\site‑packages\jupyter_client\connect.py", line 102, in secure_write with os.fdopen(os.open(fname, open_flag, 0o600), mode) as f: PermissionError: [Errno 13] Permission denied: 'C:\Users\RISHAV\AppData\Roaming\jupyter\runtime\kernelac2218024d1.json'
error in spyder
@rishav4336 See #2812 for the solution (conda install jupyter_client=5.3.4 jupyter_core=4.6.0
)
Although that doesn't seem to work with the latest conda and Anaconda. If you get an error while doing that, please run instead.
conda update --all
Problem Description
I use anaconda to install python and spyder, and use two environment.But when first open spyder the Ipython console gives an error.
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Paste Traceback/Error Below (if applicable)
Package Versions