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

environment_kernels.EnvironmentKernelSpecManager could not be imported #3

Open
robmarkcole opened this issue Jan 13, 2019 · 10 comments

Comments

@robmarkcole
Copy link

OK I hit the issue on jupyter notebook:

The 'kernel_spec_manager_class' trait of <notebook.notebookapp.NotebookApp object at 0x101478fd0> instance must be a type, but 'environment_kernels.EnvironmentKernelSpecManager' could not be imported

Resolved by pip install environment_kernels

@ageron
Copy link
Owner

ageron commented Jan 13, 2019

Interesting, thanks for your feedback. I forgot to add Jupyter to requirements.txt. I'll do that now, thanks again! Edit: mmh, that's not it, Jupyter was there. Could you please tell me more about your platform and how you are running these notebooks?

@ageron
Copy link
Owner

ageron commented Jan 13, 2019

In the thread you pointed to, @Cadair says:

You will have to have environment_kernels installed in the Python env (conda, virtualenv or system) where you are running the jupyter notebook command.

I don't recall ever doing this before. I thought installing the jupyter metapackage would also install everything needed, including this package which I never noticed before. I had no issue on my MacBook using pip, perhaps it's only on some systems, e.g., using conda? I'm not quite sure what to do. Perhaps I should add environment_kernels to requirements.txt, but I'd like to understand why it's needed first.
Some details about your setup would be quite useful. :)

@robmarkcole
Copy link
Author

OSX Mojave 10.14.2 with Anaconda , using venv

print("python", sys.version)
for module in mpl, np, pd, sklearn, tf, keras:
    print(module.__name__, module.__version__)

python 3.6.5 |Anaconda, Inc.| (default, Apr 26 2018, 08:42:37) 
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]
matplotlib 3.0.2
numpy 1.15.4
pandas 0.23.4
sklearn 0.20.1
tensorflow 1.13.0-dev20190112
tensorflow.python.keras.api._v2.keras 2.2.4-tf

sys.path

['/Users/robincole/anaconda3/lib/python36.zip',
 '/Users/robincole/anaconda3/lib/python3.6',
 '/Users/robincole/anaconda3/lib/python3.6/lib-dynload',
 '',
 '/Users/robincole/Documents/Github/tf2_course/lib/python3.6/site-packages',
 '/Users/robincole/Documents/Github/tf2_course/lib/python3.6/site-packages/IPython/extensions',
 '/Users/robincole/.ipython']

Anything else useful to print?

@ageron
Copy link
Owner

ageron commented Jan 13, 2019

Thanks @robmarkcole, could you please share what jupyter-related packages you have? Perhaps more simply, your list of python packages (and their versions).

@robmarkcole
Copy link
Author

absl-py==0.6.1
appnope==0.1.0
astor==0.7.1
backcall==0.1.0
bleach==3.1.0
cycler==0.10.0
decorator==4.3.0
defusedxml==0.5.0
entrypoints==0.3
environment-kernels==1.1.1
gast==0.2.1.post0
google-pasta==0.1
graphviz==0.10.1
grpcio==1.17.1
h5py==2.9.0
ipykernel==5.1.0
ipython==7.2.0
ipython-genutils==0.2.0
ipywidgets==7.4.2
jedi==0.13.2
Jinja2==2.10
jsonschema==2.6.0
jupyter==1.0.0
jupyter-client==5.2.4
jupyter-console==6.0.0
jupyter-core==4.4.0
Keras-Applications==1.0.6
Keras-Preprocessing==1.0.5
kiwisolver==1.0.1
Markdown==3.0.1
MarkupSafe==1.1.0
matplotlib==3.0.2
mistune==0.8.4
mock==2.0.0
nbconvert==5.4.0
nbformat==4.4.0
notebook==5.7.4
numpy==1.15.4
pandas==0.23.4
pandocfilters==1.4.2
parso==0.3.1
pbr==5.1.1
pexpect==4.6.0
pickleshare==0.7.5
Pillow==5.3.0
prometheus-client==0.5.0
prompt-toolkit==2.0.7
protobuf==3.6.1
ptyprocess==0.6.0
pydot==1.4.1
Pygments==2.3.1
pyparsing==2.3.0
python-dateutil==2.7.5
pytz==2018.9
pyzmq==17.1.2
qtconsole==4.4.3
scikit-learn==0.20.1
scipy==1.2.0
Send2Trash==1.5.0
six==1.12.0
tb-nightly==1.13.0a20190107
tensorflow-estimator-2.0-preview==1.13.0.dev2019011200
termcolor==1.1.0
terminado==0.8.1
testpath==0.4.2
tf-nightly-2.0-preview==1.13.0.dev20190112
tornado==5.1.1
traitlets==4.3.2
wcwidth==0.1.7
webencodings==0.5.1
Werkzeug==0.14.1
widgetsnbextension==3.4.2

@shailensobhee
Copy link

pip install environment_kernels did not resolve the issue for me.

@ageron
Copy link
Owner

ageron commented Jan 19, 2019

I really don't see where the problem comes from, and I cannot reproduce it. I believe this is either an Anaconda issue, or a Jupyter issue (or both). Please check for open issues in these projects, and file a new issue if needed. Sorry I cannot be of more help.

@ageron
Copy link
Owner

ageron commented Jan 19, 2019

For example this open Jupyter issue seems related.

@Sigm0oid
Copy link

pip install environment_kernels did resolve the issue for me.

@elvisomondi
Copy link

pip install environment_kernels did not help

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

5 participants