I'm using Anaconda, and I have already installed TensorFlow
which works fine. Now I want to install keras
. Here what i did:
activate tensorflow
pip install keras
installation seems to be successful. after that i run
idle
and then to test correctness, i run this:
from keras.models import Sequential
and receive following error:
Warning (from warnings module): File "C:\Users\ccc\AppData\Local\Continuum\anaconda3\envs\tensorflow\lib\site-packages\h5py__init__.py", line 36 from ._conv import register_converters as _register_converters FutureWarning: Conversion of the second argument of issubdtype from
float
tonp.floating
is deprecated. In future, it will be treated asnp.float64 == np.dtype(float).type
. Using TensorFlow backend.
I thought maybe this is just a warning, and then I run
jupyter notebook
and then try to import stuff. Error is this:
import seaborn as sns
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegressionCV
from keras.models import Sequential
from keras.layers.core import Dense, Activation
from keras.utils import np_utils
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-4f6dad112f73> in <module>()
5 from sklearn.linear_model import LogisticRegressionCV
6
----> 7 from keras.models import Sequential
8 from keras.layers.core import Dense, Activation
9 from keras.utils import np_utils
>
> ModuleNotFoundError: No module named 'keras'
EDIT i've done cd to folder where I want to do my project.
print(sys.path)
in idle returns this:
['', 'C:\\Users\\smuminov\\Desktop\\UC\\Spring-2018\\CS504\\Project\\Prediction',
'C:\Users\smuminov\AppData\Local\Continuum\anaconda3\envs\tensorflow\Scripts', 'C:\Users\smuminov\AppData\Local\Continuum\anaconda3\envs\tensorflow\python35.zip', 'C:\Users\smuminov\AppData\Local\Continuum\anaconda3\envs\tensorflow\DLLs', 'C:\Users\smuminov\AppData\Local\Continuum\anaconda3\envs\tensorflow\lib', 'C:\Users\smuminov\AppData\Local\Continuum\anaconda3\envs\tensorflow', 'C:\Users\smuminov\AppData\Local\Continuum\anaconda3\envs\tensorflow\lib\site-packages', 'C:\Users\smuminov\AppData\Local\Continuum\anaconda3\envs\tensorflow\lib\site-packages\uritemplate-3.0.0-py3.5.egg']
in jupyter in returns this:
['', 'C:\Users\smuminov\AppData\Local\Continuum\anaconda3\python36.zip', 'C:\Users\smuminov\AppData\Local\Continuum\anaconda3\DLLs', 'C:\Users\smuminov\AppData\Local\Continuum\anaconda3\lib', 'C:\Users\smuminov\AppData\Local\Continuum\anaconda3', 'C:\Users\smuminov\AppData\Local\Continuum\anaconda3\lib\site-packages', 'C:\Users\smuminov\AppData\Local\Continuum\anaconda3\lib\site-packages\win32', 'C:\Users\smuminov\AppData\Local\Continuum\anaconda3\lib\site-packages\win32\lib', 'C:\Users\smuminov\AppData\Local\Continuum\anaconda3\lib\site-packages\Pythonwin', 'C:\Users\smuminov\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\extensions', 'C:\Users\smuminov\.ipython']
They are different. Should they be the same?