MMdnn icon indicating copy to clipboard operation
MMdnn copied to clipboard

Keras module not found (and some others too)

Open bwery opened this issue 5 years ago • 3 comments

Platform (like ubuntu 16.04/win10): ubuntu 18.04

Python version: 3.6.9

After installation of mmdnn with command "pip install mmdnn", any mmdnn command related to keras fails with message: "ModuleNotFoundError: No module named 'keras'"

For instance command "$mmdownload -f keras" produces this error stack:

Traceback (most recent call last): File "/home/bw/.local/bin/mmdownload", line 8, in sys.exit(_main()) File "/home/bw/.local/lib/python3.6/site-packages/mmdnn/conversion/_script/extractModel.py", line 122, in _main extract_model(args) File "/home/bw/.local/lib/python3.6/site-packages/mmdnn/conversion/_script/extractModel.py", line 30, in extract_model from mmdnn.conversion.examples.keras.extractor import keras_extractor File "/home/bw/.local/lib/python3.6/site-packages/mmdnn/conversion/examples/keras/extractor.py", line 8, in import keras ModuleNotFoundError: No module named 'keras'

This does not to occur with "caffe" or "mxnet" for which such command succeeds, but it occurs also with the other framework identifiers.

May be an installation issue ?

Thank you for your help !

bwery avatar Apr 16 '20 17:04 bwery

@bwery , thank you very much for the feedback. MMdnn does not install Keras automatically, so you may try the following command to install it manually:

pip3 install --user keras==2.2.4

Please note:

  1. '--user' will install Keras to /home/bw/.local/lib/python3.6/site-packages
  2. You may try the latest Keras 2.3.1

linmajia avatar Apr 18 '20 01:04 linmajia

Thank you linmajia ! Seems to be the first step for resolution. It was not clear for me that mmdnn was requiring the frameworks to be present. This solve the issue about the module not found. Now, I have another issue that looks related to the fact that I have Tensoflow 2.1 installed, but this is another point. I investigate.

bwery avatar Apr 21 '20 08:04 bwery

@bwery , thank you very much for the feedback. MMdnn does not install Keras automatically, so you may try the following command to install it manually:

pip3 install --user keras==2.2.4

Please note:

  1. '--user' will install Keras to /home/bw/.local/lib/python3.6/site-packages
  2. You may try the latest Keras 2.3.1

I have Keras installed, but still I get the same error.

Platform: Ubuntu 18.04 Python version: 3.6.9 Keras version: 2.3.1

AlexPasqua avatar Jul 22 '20 09:07 AlexPasqua