I can't figure out how why the
keras package isn't installing correctly for me. I did:
install.packages("keras") library(keras) install_keras()
But when I try running
model_keras <- keras_model_sequential(), I get the following error:
ImportError: No module named keras Use the install_keras() function to install the core Keras library Error: Error loading Python module keras
I saw that
py_config() was one way to see what could be wrong, and this is what I saw:
python: /usr/bin/python libpython: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/libpython2.7.dylib pythonhome: /System/Library/Frameworks/Python.framework/Versions/2.7:/System/Library/Frameworks/Python.framework/Versions/2.7 version: 2.7.10 (default, Aug 17 2018, 19:45:58) [GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.0.42)] numpy: /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy numpy_version: 1.8.0 keras: [NOT FOUND] python versions found: /Users/dhong/anaconda/envs/r-tensorflow/bin/python /usr/bin/python /usr/local/bin/python3 /Users/dhong/anaconda/bin/python /Users/dhong/anaconda3/bin/python
The references to Python 2.7 are strange because when I run
python -V in Terminal (I'm on Mac), I get the following:
Python 3.6.4 :: Anaconda, Inc.
Someone please help a newb out! This is driving me crazy!