-
Notifications
You must be signed in to change notification settings - Fork 290
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
Kernels dies immediately due to library name collisions #973
Comments
Removing almost all dependencies from the
It's a bit surprising that the subprocess |
Can you show the output of Running python scripts adds the 'script directory' (and PYTHONPATH, if defined) to sys.path at the highest priority (i.e. before the standard library!). For interactive Python sessions like IPython, that means the current directory ( Interactive Python sessions add the current working directory as the first entry in You can try starting with the environment variable |
OK! That's progress! I added an 'empty_dir' and running My base path looks like this:
So that means we've got a solid understanding of the cause, and need to come up with an appropriate fix. We can't just always run the notebook from an empty directory because: a) The b) Running Thanks for your help so far! Very happy to hear any additional ideas for mitigation. |
Alright, further meditation has helped. The problem is that the notebooks are inside the 'chirp' directory alongside some files whose names conflict with some deep core modules. (like, for example, 'signal'.) When we start a new notebook in the root directory, there are no conflicts, because all of the files/modules will be of the form 'chirp.signal'. But if I start the notebook from inside the chirp directory, The solution then is to move our notebooks to a non-conflicting place (liek the top-level directory) and add a |
👍 it's a lot easier to pick one name that avoids conflicts than checking every single filename. You should also be able to avoid the collision problem with I'll close this as there isn't really anything for jupyter-client (or more precisely IPython) to do about it beyond the one option above. It's a general Python issue. |
Hello! I am experiencing a very strange issue where kernels are dying immediately due to a failure to import asyncio in zmq.
This occurs when using the poetry-installed dependencies for our project here:
https://github.com/google-research/perch
And the following is the output from
jupyter --version
:Observations:
import asyncio
andfrom ipykernel import kernelapp as app
without producing the error, suggesting that the problem is somehow related to the frozen_runpy environment?asyncio.__init__
,base_events.__all__
does not trigger an error, butcoroutines
does.Various things tried so far:
I am completely flummoxed.
The text was updated successfully, but these errors were encountered: