Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spyder with Anaconda 4.0 fails to start IPython terminal #751

Closed
ijstokes opened this issue Apr 13, 2016 · 6 comments
Closed

Spyder with Anaconda 4.0 fails to start IPython terminal #751

ijstokes opened this issue Apr 13, 2016 · 6 comments
Assignees

Comments

@ijstokes
Copy link

I have a virgin install of Anaconda 4.0 (for Python 3.5). The very first thing I did was start Spyder. The IDE started, but I got this error message in the bottom right window:

An error ocurred while starting the kernel
Error in sitecustomize; set PYTHONVERBOSE for traceback:
AttributeError: module 'pkg_resources' has no attribute 'DistributionNotFound'
Traceback (most recent call last):
File "C:\Anaconda3\lib\site‑packages\spyderlib\widgets\externalshell\start_ipython_kernel.py", line 183, in 
from IPython.kernel.zmq.kernelapp import IPKernelApp
File "C:\Anaconda3\lib\site‑packages\IPython\__init__.py", line 49, in 
from .terminal.embed import embed
File "C:\Anaconda3\lib\site‑packages\IPython\terminal\embed.py", line 18, in 
from IPython.terminal.interactiveshell import TerminalInteractiveShell
File "C:\Anaconda3\lib\site‑packages\IPython\terminal\interactiveshell.py", line 18, in 
from IPython.lib.clipboard import ClipboardEmpty
File "C:\Anaconda3\lib\site‑packages\IPython\lib\clipboard.py", line 7, in 
import IPython.utils.py3compat as py3compat
AttributeError: module 'IPython' has no attribute 'utils'

I am on a 64-bit Windows 8 system.

https://www.dropbox.com/s/dfj4yokhh02tvp8/Screenshot%202016-04-13%2015.31.06.png?dl=0

@vmuriart
Copy link

can you start ipython by itself? specifically Jupyer ipython in qt ?
I had a similar issue with the install on 2 out of my 3 machines; this thread fixed it though. Note that there are two possible solutions on it

@ccordoba12 ccordoba12 self-assigned this Apr 14, 2016
@ccordoba12
Copy link

Thanks @ijstokes for reporting. Which Windows version are you using?

@venergiac
Copy link

same for me,

after spyder --reset

it works, but I have to reconfigure the workspace.
Normally it happens (in my opinion) when the kernel crashes or remains in stuck

Windows 7 version, anaconda 3 4.0.0 64bit windows

An error ocurred while starting the kernel
Error in sitecustomize; set PYTHONVERBOSE for traceback:
ConnectionClosed:
ERROR: 3rd party plugin import failed for io_hdf5
Traceback (most recent call last):
File "C:\Anaconda3\lib\site‑packages\spyderlib\otherplugins.py", line 53, in get_spyderplugins_mods
import(name)
File "C:\Anaconda3\lib\site‑packages\spyderplugins\io_hdf5.py", line 38, in
import numpy as np
File "C:\Anaconda3\lib\site‑packages\numpy__init__.py", line 180, in
from . import add_newdocs
File "C:\Anaconda3\lib\site‑packages\numpy\add_newdocs.py", line 13, in
from numpy.lib import add_newdoc
File "C:\Anaconda3\lib\site‑packages\numpy\lib__init__.py", line 8, in
from .type_check import *
File "C:\Anaconda3\lib\site‑packages\numpy\lib\type_check.py", line 11, in
import numpy.core.numeric as nx
AttributeError: module 'numpy' has no attribute 'core'
Traceback (most recent call last):
File "C:\Anaconda3\lib\site‑packages\spyderlib\widgets\externalshell\start_ipython_kernel.py", line 185, in
ipk_temp.config = kernel_config()
File "C:\Anaconda3\lib\site‑packages\spyderlib\widgets\externalshell\start_ipython_kernel.py", line 70, in kernel_config
mpl_installed = is_module_installed('matplotlib')
File "C:\Anaconda3\lib\site‑packages\spyderlib\utils\programs.py", line 292, in is_module_installed
actver = get_module_version(module_name)
File "C:\Anaconda3\lib\site‑packages\spyderlib\utils\programs.py", line 238, in get_module_version
mod = import(module_name)
File "C:\Anaconda3\lib\site‑packages\matplotlib__init
_.py", line 122, in
from matplotlib.cbook import is_string_like, mplDeprecation, dedent, get_label
File "C:\Anaconda3\lib\site‑packages\matplotlib\cbook.py", line 33, in
import numpy as np
File "C:\Anaconda3\lib\site‑packages\numpy__init__.py", line 180, in
from . import add_newdocs
File "C:\Anaconda3\lib\site‑packages\numpy\add_newdocs.py", line 13, in
from numpy.lib import add_newdoc
File "C:\Anaconda3\lib\site‑packages\numpy\lib__init__.py", line 8, in
from .type_check import *
File "C:\Anaconda3\lib\site‑packages\numpy\lib\type_check.py", line 11, in
import numpy.core.numeric as _nx
AttributeError: module 'numpy' has no attribute 'core'

@ccordoba12
Copy link

@venergiac, it seems your Numpy installation is broken. Please run

conda install -f numpy

to fix it :-)

@venergiac
Copy link

Tx , but after

conda install -f numpy

no module name pycosat

then I tried

conda install -all

and the anaconda installation was corrupted.

Then I reinstalled anaconda (uninstall, install for all user).
Then again

import numpy.core.numeric as _nx
AttributeError: module 'numpy' has no attribute 'core'

after

spyder --reset

I reconfigured spyder, and worked well.

I replicated the issue with the following procedure

script.py

 PORT = 8000
    httpd = socketserver.TCPServer(("", PORT), MyrHandler)

    print("serving at port", PORT)
    httpd.serve_forever()

then killed the kernel with the red button, and again:

AttributeError: module 'numpy' has no attribute 'core'

@ijstokes
Copy link
Author

I think this was tied to some problems with the configuration files. Pretty sure this is now resolved in more recent versions of Anaconda. If anyone experiences this with Anaconda >= 4.3 please shout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants