-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
New IPython consoles or restart of kernel not working because of pkg_resources error #2679
Comments
This clearly seems an issue with pyzo, not with Spyder, so please report this error with them. |
Hi, I just installed anaconda from skretch as suggested in #2680. Right after installation it worked. The following packages will be downloaded:
The following NEW packages will be INSTALLED:
The following packages will be UPDATED:
|
I really don't understand why you're getting the same error as the pyzo one, if pyzo is not part of Anaconda :-) |
Please post the exact error you're getting with Anaconda :-) |
Hi Error in sitecustomize; set PYTHONVERBOSE for traceback:
TypeError: 'NoneType' object is not callable
Traceback (most recent call last):
File "/mnt/disk2/opt/anaconda3/lib/python3.4/site‑packages/spyderlib/widgets/externalshell/start_ipython_kernel.py", line 175, in
from IPython.kernel.zmq.kernelapp import IPKernelApp
File "/mnt/disk2/opt/anaconda3/lib/python3.4/site‑packages/IPython/__init__.py", line 48, in
from .terminal.embed import embed
File "/mnt/disk2/opt/anaconda3/lib/python3.4/site‑packages/IPython/terminal/embed.py", line 16, in
from IPython.core.interactiveshell import DummyMod
File "/mnt/disk2/opt/anaconda3/lib/python3.4/site‑packages/IPython/core/interactiveshell.py", line 31, in
from pickleshare import PickleShareDB
File "/mnt/disk2/opt/anaconda3/lib/python3.4/site‑packages/pickleshare.py", line 41, in
from path import path as Path
File "/mnt/disk2/opt/anaconda3/lib/python3.4/site‑packages/path.py", line 122, in
__version__ = pkg_resources.require('path.py')[0].version
TypeError: 'NoneType' object is not callable |
I really don't know what's happening, sorry. Couldn't you stay on Anaconda 2.3 for the moment? I mean, if that's working for you, you should stay there :-) |
I was just interested in spyder 2.3.6 instead of 2.3.5.2 because it fixed this |
Then please run
to only update Spyder :-) |
So first I did
The following packages will be UPDATED:
afterwards I tried with Thanks |
I'm glad to know that you were able to workaround this problem :-) I'll take a closer look at this issue and I'll try to fix for 2.3.7 |
Ok, according to this post: http://stackoverflow.com/questions/32155633/error-while-starting-new-ipython-console-in-spyder this problem has nothing to do with Spyder, and it is solved by running
in case you're using Anaconda. If not, you just need to update |
Hm...I think that's the issue for me though. I think I had a similar problem where I've also tried conda update setuptools on my terminal, but the issue still lingers. Is it a separate problem? (Trying to learn Python and this issue isn't helping me get started as a beginner...It'll be a great help for me, thank you guys in advance. Should I just do a fresh install and not update spyder to 2.3.6 from 2.3.5.2 at the moment?) What's shown on the IPython console (below): An error ocurred while starting the kernel (I've tried playing around with the program and I somehow manage to keep one IPython console functional by opening it with a regular Python console at the same time, but I can't get any new consoles opened for IPython without that error message reappearing. And if I restart the kernel on the console that works, the error screen will appear. This is very frustrating.) |
@leekahung, please run the command I mentioned in my last comment to fix this problem. |
@ccordoba12 - I'm have the same issue and I have run: conda reports it's already up to date. Edit: Here's 100% repro case for me:
now you get the path.py issue when spyder attempts to start an ipython console |
@ccordoba12, I’m getting the exact same error message as @leekahung posted and had similar experience as @steve28. Somedays, I wouldn’t see it, other days, I would get it every time. On one of those bad days, I tried three different installations for experimentation:
However, in the 2nd and 3rd cases, I did notice something that might be helpful: when I deleted my As a temporary work-around, I edited the file:
I'm sure that's not the right fix, but it gets me running for now. |
I'm having exactly the same issue. works perfect with fresh anaconda, then I installed joblib using conda, and I start having the issue. |
Still have the same problem with spyder 2.3.7. But I can confirm that twmacro commented on Oct 11 worked also for me. |
same problem. Tried the measure mentioned by @ccordoba12 -- it did not work |
Hi @DSLituiev was the same for me, the one mentioned by @twmacro should work right? Well is just a temporary fix, is probably not the right solution but at least it works... |
I’m seeing this same behavior with I stumbled on another apparent fix while I attempted to follow this through with a debugger (
The other little tidbit I learned through trying to debug this is that the parent python process has no trouble getting through I don’t know if any of that info might help the developer, but I hope. |
@twmacro, thanks for all your work to solve this problem. I'm going to use your October 10 proposed solution to patch the There's going to be a new Anaconda release (2.4.1) in December, so this is the perfect time to fix it! |
@ccordoba12, fantastic! :-) |
Thank you everyone for your hard work! While I'm good at the moment with temporary fixes, I'm looking forward to the new patch! |
I'm still having this issue with Anaconda 2.4.1 and Spyder 2.3.8. Looking into the path.py file, it looks like it was not updated. Was the patch made as planned ? |
Hello, I'm having the same issue with conda 3.19.3 and spyder Spyder 2.3.8. When restarting the IPython console, the error log is below. Note that restarting Spyder works (no IPython crash).
|
Hello, Note error appears also just by opening a 2nd ipython console (Ctrl-T) Error in sitecustomize; set PYTHONVERBOSE for traceback: |
@samotracio, could you run
to see if that fixes the problem? |
@ccordoba12 : yeap, that solved the problem! Thanks! conda update -f path.py The following packages will be UPDATED: |
I see, glad it fixed it for you ;-) |
Related but slightly different error here; I encountered this when starting with a clean Ubuntu 15.04 vm and installing anaconda off the website. Firing up spyder, I get this: Error in sitecustomize; set PYTHONVERBOSE for traceback: During handling of the above exception, another exception occurred:
I tried the forced update of path.py, and initially it worked, but after doing a conda update all, it broke again, and the forced update of path.py won't fix it. Any thoughts? |
A little further info: uninstalled everything, rebooted, reinstalled. Run spyder, everything works great off the bat. Shutdown spyder. reboot, launch spyder again, get error shown above. Not sure how to interpret this, other than some setting or flag doesn't persist through a reboot... |
@andybrnr, please run
That should fix your error :-) |
Hi ccordoba12, thanks for the response. I've tried that--already on 8.1.2 for path, and update -f to rewrite it had no effect. So I don't know if this is a variant of the old issue or something different, but no dice on the old fix. Thoughts? |
Also, seems there's the issue of multiple consoles. I've intermittently gotten it to open ok, but right-click open new console fails with the error above. |
Ok, so it seems like somehow the method "require" used to be None, but now simply doesn't exist? The fact that the error used to be "NoneType is not executable" means the attribute was null (I think?). When it then fell through to the excepts, the patch handles the NoneType. Now the except statement was causing the error, as trying to evaluate pkg_resources.DistributionNotFound threw an AttributeError (no longer exists?). I patched by putting an "except AttributeError" above the pkg_resources.DistributionNotFound like so:
This has fixed the issue for me. |
I don't understand the big picture here with what is going on in the code, but from just looking at that try-except block, I'd prefer just this:
|
I'll try it when I'm back at my work box tomorrow. Based on how I understand the code to be failing, I'm pretty sure that will work fine. I'm curious what functionality this section was intended to achieve, but simply setting version='unknown' doesn't seem to break anything important. |
Yeah, that works fine. Would recommend this solution for a final patch. |
I'm also getting a similar error when I try to start Spyder. It doesn't seem to have been caused by anything specific I did:
I've already tried updating conda, spyder and path.py and I'm still getting the issue. Any ideas? |
Please post the result of
here to see if everything is in order. |
Hey, my final hope (which you suggested in some google groups forum) was to reset Spyder ( |
Glad |
I had the same problem. However, in my case, it was because I had a file with the same name as a core module, and python was trying to load the wrong file from my root. Changed the name, and it was back to normal. |
Description
What steps will reproduce the problem?
What is the expected output? What do you see instead?
A new console should appear but the new console immediately stops with the following error:
Please provide any additional information below
Version and main components
Optional dependencies
The text was updated successfully, but these errors were encountered: