Try to run Keras in MacOSX, using a virtual environment
Versions
Troubleshooting
Logs
(venv) me$sudo pip install --upgrade keras
Collecting keras
Requirement already up-to-date: six in /Library/Python/2.7/site-packages/six-1.10.0-py2.7.egg (from keras)
Requirement already up-to-date: pyyaml in /Library/Python/2.7/site-packages (from keras)
Requirement already up-to-date: theano in /Library/Python/2.7/site-packages (from keras)
Requirement already up-to-date: numpy>=1.9.1 in /Library/Python/2.7/site-packages (from theano->keras)
Requirement already up-to-date: scipy>=0.14 in /Library/Python/2.7/site-packages (from theano->keras)
Installing collected packages: keras
Successfully installed keras-2.0.5
(venv) me$ python -c "import keras; print(keras.__version__)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named keras
The underlying problem here is what when you use sudo
, pip
points to the global, system-level python and not the virtual-env python. That is why, when you install without sudo
, it works seamlessly for you. You can check this by running sudo pip install --upgrade keras
from within the virtualenv and then running python -c "import keras; print(keras.__version__)"
outside the virtualenv.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With