Jupyter cannot find keras module

I installed Tensorflow and Keras from Anaconda (on Windows 10), I created an environment in which I use Python 3.5.2 (the original in Anaconda was Python 3.6). When I try to execute import keras as ks, I get ModuleNotFoundError: No module named 'keras'.

I tried to solve this problem with sys.path.append(C:\\Users\\ ... \\Anaconda3\\python.exe)

with both a laptop and a console, but I keep getting the same error.

How can I solve this problem?

+7
source share
7 answers

Jupyter iPython , python. , Jupyter, iPython. , keras Jupyter: iPython Anaconda. Jupyter keras:

In [2]: import sys; sys.path
Out[2]: 
['/home/user/anaconda3/bin',
 '/home/user/anaconda3/lib/python36.zip',
 '/home/user/anaconda3/lib/python3.6',
 '/home/user/.ipython']

, , conda, - . , , .

- :

source deactivate && source activate [my_env]

ipython:

Out[2]: 
['/home/user/anaconda3/envs/ml3/bin',
 '/home/user/anaconda3/envs/ml3/lib/python36.zip',
 '/home/user/anaconda3/envs/ml3/lib/python3.6',
 '/home/user/.ipython']
+3

, :

jupyter:

import sys

sys.path

sys.executable

,

Jupyter .

$ . your_env/bin/activate

(your_env)$ python -m pip install jupyter

+3

( , )

sys.path - Python, .

  • , ​​Keras, sys.path. Keras?
  • Python. ?
  • Jupiter, sys.path , sys.path, Python?
  • Keras Python?

, , , . , , Python . sys.path , .

+1

jupyter , , python 3.5.

    python --version

, , jupyter .

Python 2.x Python 3.x IPython Notebook

.

0

, Jupyter, . , Anaconda. Keras .

0

Windows/Mac, Jupyter, "pip install keras" . . 1. " " . 2. "conda install tenorflow" "conda install keras" 3. Jupyter .

0

pip install keras sudo -H pip3 install keras pip3 install keras. . , : pip install Keras. , ""

0

Source: https://habr.com/ru/post/1675404/


All Articles