python - conda installed packages not working with jupyter -
i had installed tensorflow pip install, , installed keras conda install: (my python3 installed under anaconda3)
conda create -n keras python=3.5 activate keras pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.2.1-cp35-cp35m-win_amd64.whl conda install --channel https://conda.anaconda.org/conda-forge keras now when run following commands in commandline, works fine:
activate keras python import tensorflow import keras keras.datasets import mnist however, when run same commands jupyter, error on keras import line:
activate keras jupyter notebook # open python3 notebook # , enter above commands in # , run importerror: no module named 'keras' however import tensorflow gives no error.
i uninstalled tensorflow, , reinstalled conda install:
conda install tensorflow now when run jupyter, same error on tensorflow line also.
how can jupyter work on packages installed conda?
additional information: ran sys.executable both commandline , jupyter, , both point same path:
'c:\\sw\\anaconda3\\envs\\tensorflow\\python.exe' it looks recent problem, found similar report @ https://github.com/jupyter/jupyter/issues/245, did not quite understand solution. can here?
i found answer @ http://ipython.readthedocs.io/en/stable/install/kernel_install.html#kernels-for-different-environments
ipykernel has linked environment, , jupyter can use it.
the following installation procedure works:
conda create -n keras python=3.5 ipykernel activate keras python -m ipykernel install --user --name keras jupyter notebook now if call sys.executable in jupyter notebook, prints correct environment executables accessed.
Comments
Post a Comment