I updated spyder to 4.0.1 and received this error and i also downgraded spyder to 3.7 but still it's not working
Traceback (most recent call last):
File "C:\Users\Lazxy\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 3285, *in main*
mainwindow = run_spyder(app, options, args)
File "C:\Users\Lazxy\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 3140, in run_spyder
main.setup()
File "C:\Users\Lazxy\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 914, in setup
from spyder.plugins.ipythonconsole import IPythonConsole
File "C:\Users\Lazxy\Anaconda3\lib\site-packages\spyder\plugins\ipythonconsole.py", line 25, in
from jupyter_client.connect import find_connection_file
File "C:\Users\Lazxy\Anaconda3\lib\site-packages\jupyter_client\__init__.py", line 4, in
from .connect import *
File "C:\Users\Lazxy\Anaconda3\lib\site-packages\jupyter_client\connect.py", line 35, *in
from jupyter_core.paths import jupyter_data_dir, jupyter_runtime_dir, secure_write*
ImportError: cannot import name 'secure_write' from 'jupyter_core.paths'
(C:\Users\Lazxy\Anaconda3\lib\site-packages\jupyter_core\paths.py)
Try this
conda update jupyter_core
Related
REVISED: now I get another timeit error!
I was working on coding in spyder launched from anaconda and suddenly I got this error: Timer not found in timeit, which had been working for me a second before. Then I restarted anaconda and reinstalled spyder but when I tried to launch spyder again I got the below error. Can anyone help? I am using MacOS and the newest version of spyder.
Application launch error: Application spyder may have produced following errors.
Traceback (most recent call last):
File "/Users/___/opt/anaconda3/bin/spyder", line 11, in
sys.exit(main())
File "/Users/___/opt/anaconda3/lib/python3.8/site-packages/spyder/app/start.py", line 205, in main
mainwindow.main()
File "/Users/___/opt/anaconda3/lib/python3.8/site-packages/spyder/app/mainwindow.py", line 3651, in main
mainwindow = run_spyder(app, options, args)
File "/Users/___/opt/anaconda3/lib/python3.8/site-packages/spyder/app/mainwindow.py", line 3526, in run_spyder
main.setup()
File "/Users/___/opt/anaconda3/lib/python3.8/site-packages/spyder/app/mainwindow.py", line 945, in setup
from spyder.plugins.ipythonconsole.plugin import IPythonConsole
File "/Users/___m/opt/anaconda3/lib/python3.8/site-packages/spyder/plugins/ipythonconsole/plugin.py", line 46, in
from spyder.plugins.ipythonconsole.widgets import (ClientWidget,
File "/Users/___/opt/anaconda3/lib/python3.8/site-packages/spyder/plugins/ipythonconsole/widgets/__init__.py", line 16, in
from .debugging import DebuggingWidget
File "/Users/___/opt/anaconda3/lib/python3.8/site-packages/spyder/plugins/ipythonconsole/widgets/debugging.py", line 15, in
from IPython.core.history import HistoryManager
File "/Users/___/opt/anaconda3/lib/python3.8/site-packages/IPython/__init__.py", line 56, in
from .terminal.embed import embed
File "/Users/___/opt/anaconda3/lib/python3.8/site-packages/IPython/terminal/embed.py", line 17, in
from IPython.terminal.ipapp import load_default_config
File "/Users/___/opt/anaconda3/lib/python3.8/site-packages/IPython/terminal/ipapp.py", line 28, in
from IPython.core.magics import (
File "/Users/___/opt/anaconda3/lib/python3.8/site-packages/IPython/core/magics/__init__.py", line 21, in
from .execution import ExecutionMagics
File "/Users/___/opt/anaconda3/lib/python3.8/site-packages/IPython/core/magics/execution.py", line 148, in
class Timer(timeit.Timer):
AttributeError: module 'timeit' has no attribute 'Timer'
You have to install NumPy library
conda install numpy
I'm trying to run 'conda install something' on macOS Mojave but i'm getting this error at every turn:
conda install update
This is the entire traceback:
Traceback (most recent call last):
File "/anaconda2/bin/conda", line 13, in <module>
sys.exit(main())
File "/anaconda2/lib/python2.7/site-packages/conda/cli/main.py", line 149, in main
from ..exceptions import conda_exception_handler
File "/anaconda2/lib/python2.7/site-packages/conda/exceptions.py", line 18, in <module>
from ._vendor.auxlib.entity import EntityEncoder
File "/anaconda2/lib/python2.7/site-packages/conda/_vendor/auxlib/entity.py", line 253, in <module>
from .collection import AttrDict, frozendict, make_immutable
File "/anaconda2/lib/python2.7/site-packages/conda/_vendor/auxlib/collection.py", line 10, in <module>
from .compat import isiterable, iteritems, odict, text_type
File "/anaconda2/lib/python2.7/site-packages/conda/_vendor/auxlib/compat.py", line 10, in <module>
from ._vendor.five import WhateverIO as StringIO, with_metaclass
File "/anaconda2/lib/python2.7/site-packages/conda/_vendor/auxlib/_vendor/five.py", line 80, in <module>
absolute_to_nanoseconds = CoreServices.AbsoluteToNanoseconds
File "/anaconda2/lib/python2.7/ctypes/__init__.py", line 379, in __getattr__
func = self.__getitem__(name)
File "/anaconda2/lib/python2.7/ctypes/__init__.py", line 384, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(RTLD_DEFAULT, AbsoluteToNanoseconds): symbol not found
how can i fix it?
A similar error happened to me on macOS Big Sur and removing miniconda2 and installing miniconda3 worked for me.
I followed the instructions on https://docs.conda.io/en/latest/miniconda.html which is basically:
rm -rf ~/miniconda2
rm -rf ~/.condarc ~/.conda ~/.continuum
bash Miniconda3-latest-MacOSX-x86_64.sh # after downloading the installable
I am a complete newbie to Python.
I have downloaded and installed Anaconda 3.5.2 on Windows 7, then Eclipse Photon. Installed the PyDev Plugin.
I was able to run a few simple test programs in Eclipse.
Suddenly, without installing anything I get
Error processing line 1 of C:\Anaconda3\lib\site-packages\matplotlib-2.2.2-py3.6-nspkg.pth:
Failed to import the site module
Traceback (most recent call last):
File "C:\Anaconda3\lib\site.py", line 168, in addpackage
exec(line)
File "<string>", line 1, in <module>
File "C:\Anaconda3\lib\types.py", line 171, in <module>
import functools as _functools
File "C:\Anaconda3\lib\functools.py", line 21, in <module>
from collections import namedtuple
ImportError: cannot import name 'namedtuple'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Anaconda3\lib\site.py", line 541, in <module>
main()
File "C:\Anaconda3\lib\site.py", line 523, in main
known_paths = addsitepackages(known_paths)
File "C:\Anaconda3\lib\site.py", line 320, in addsitepackages
addsitedir(sitedir, known_paths)
File "C:\Anaconda3\lib\site.py", line 207, in addsitedir
addpackage(sitedir, name, known_paths)
File "C:\Anaconda3\lib\site.py", line 178, in addpackage
import traceback
File "C:\Anaconda3\lib\traceback.py", line 5, in <module>
import linecache
File "C:\Anaconda3\lib\linecache.py", line 8, in <module>
import functools
File "C:\Anaconda3\lib\functools.py", line 21, in <module>
from collections import namedtuple
ImportError: cannot import name 'namedtuple'
even with a "Hello World" which ran before
Any ideas what could cause this?
I have found the reason:
I have added a "PyDev Package" named "collections" in the IDE. This collided with something ....
You can try a few things. Have you tried updating the package in conda? It is possible it is not up to date. Also, with Eclipse (and with most IDEs) if things that were working a moment break without any changes it is a sign you should quit the program, give it a moment to settle, and try reopening and rerunning your code. Sometimes it is the tool's fault!
I am getting the below error while using the command:
python get-pip.py
Error:
c:\Python>python get-pip.py
Traceback (most recent call last):
File "get-pip.py", line 20061, in <module>
main()
File "get-pip.py", line 194, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 82, in bootstrap
import pip
File "C:\Users\dell\AppData\Local\Temp\tmpa0q8wceq\pip.zip\pip\__init__.py", l
ine 26, in <module>
File "C:\Users\dell\AppData\Local\Temp\tmpa0q8wceq\pip.zip\pip\utils\__init__.
py", line 27, in <module>
File "C:\Users\dell\AppData\Local\Temp\tmpa0q8wceq\pip.zip\pip\_vendor\pkg_res
ources\__init__.py", line 35, in <module>
File "c:\Python\lib\plistlib.py", line 65, in <module>
from xml.parsers.expat import ParserCreate
File "c:\Python\lib\xml\parsers\expat.py", line 4, in <module>
from pyexpat import *
ImportError: DLL load failed: The specified module could not be found.
I'm pretty sure that pip comes with python 3 and up. If you have troubles running only "pip" from the terminal i'd recommend you try: python -m pip ...
Try to use the 'Alternative instructions' from this post.
Hope this can help.
I am having trouble starting spyder (I have installed Anaconda 64 bit version python 3.5). When I run spyder or spyder.exe in cmd I see the green logo of spyder but nothing happens afterwards, except that I get an error msg:
(C:\Program Files\Anaconda3) C:\WINDOWS\system32>spyder
Traceback (most recent call last):
File "C:\Program Files\Anaconda3\Scripts\spyder-script.py", line 5, in <module>
sys.exit(spyder.app.start.main())
File "C:\Program Files\Anaconda3\lib\site-packages\spyder\app\start.py", line 103, in main
from spyder.app import mainwindow
File "C:\Program Files\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 154, in <module>
from spyder.utils.environ import WinUserEnvDialog
File "C:\Program Files\Anaconda3\lib\site-packages\spyder\utils\environ.py", line 20, in <module>
from spyder.widgets.variableexplorer.collectionseditor import CollectionsEditor
File "C:\Program Files\Anaconda3\lib\site-packages\spyder\widgets\variableexplorer\collectionseditor.py", line 45, in <module>
from spyder.widgets.variableexplorer.importwizard import ImportWizard
File "C:\Program Files\Anaconda3\lib\site-packages\spyder\widgets\variableexplorer\importwizard.py", line 26, in <module>
import pandas as pd
File "C:\Program Files\Anaconda3\lib\site-packages\pandas\__init__.py", line 37, in <module>
import pandas.core.config_init
File "C:\Program Files\Anaconda3\lib\site-packages\pandas\core\config_init.py", line 14, in <module>
import pandas.core.config as cf
AttributeError: module 'pandas' has no attribute 'core'
I am running Win 10 Pro 64bit
If you want to install Spyder directly, you need to follow these steps:
Install the essential requirements:
Python2.7+ or 3.4+
PyQt5 (recommended) or PyQt4
Install Spyder and its dependencies by running this command:
pip install spyder
For more read this :https://docs.continuum.io/anaconda/ide_integration