hyperas icon indicating copy to clipboard operation
hyperas copied to clipboard

can not import optim

Open xiaobenhou opened this issue 5 years ago • 2 comments

Hello,

Below is the error message I got when I tried to import optim.

ModuleNotFoundError Traceback (most recent call last) in ----> 1 from hyperas import optim

~\AppData\Local\Continuum\anaconda3\lib\site-packages\hyperas\optim.py in 9 from nbconvert import PythonExporter 10 ---> 11 from .ensemble import VotingModel 12 from .utils import ( 13 remove_imports, remove_all_comments, extract_imports, temp_string,

~\AppData\Local\Continuum\anaconda3\lib\site-packages\hyperas\ensemble.py in 1 import numpy as np ----> 2 from keras.models import model_from_yaml 3 4 5 class VotingModel(object):

ModuleNotFoundError: No module named 'keras'

Thanks

xiaobenhou avatar Feb 24 '20 03:02 xiaobenhou

Have you tried installing keras?

pip install keras

JonnoFTW avatar Feb 24 '20 05:02 JonnoFTW

Yes. Have done that before installing hyperas. I also tried to re-run pip install keras again and got the message below. I ran 'python -m pip install hyperas' under anaconda prompt to install the package.

Requirement already satisfied: keras in c:\users\xxx\appdata\local\continuum\anaconda3\lib\site-packages (2.3.1) Requirement already satisfied: numpy>=1.9.1 in c:\users\xxx\appdata\local\continuum\anaconda3\lib\site-packages (from keras) (1.16.5) Requirement already satisfied: scipy>=0.14 in c:\users\xxx\appdata\local\continuum\anaconda3\lib\site-packages (from keras) (1.3.1) Requirement already satisfied: six>=1.9.0 in c:\users\xxx\appdata\local\continuum\anaconda3\lib\site-packages (from keras) (1.12.0) Requirement already satisfied: pyyaml in c:\users\xxx\appdata\local\continuum\anaconda3\lib\site-packages (from keras) (5.1.2) Requirement already satisfied: h5py in c:\users\xxx\appdata\local\continuum\anaconda3\lib\site-packages (from keras) (2.9.0) Requirement already satisfied: keras_applications>=1.0.6 in c:\users\xxx\appdata\local\continuum\anaconda3\lib\site-packages (from keras) (1.0.8) Requirement already satisfied: keras_preprocessing>=1.0.5 in c:\users\xxx\appdata\local\continuum\anaconda3\lib\site-packages (from keras) (1.1.0)

On Mon, Feb 24, 2020 at 12:58 AM Jonathan Mackenzie < [email protected]> wrote:

Have you tried installing keras?

pip install keras

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/maxpumperla/hyperas/issues/272?email_source=notifications&email_token=AIGLFJLAS2STTAJPPNJWU5TRENOXHA5CNFSM4K2AWPD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMWWGUA#issuecomment-590177104, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIGLFJOSVE4JEFT74MVU4ZDRENOXHANCNFSM4K2AWPDQ .

xiaobenhou avatar Feb 24 '20 14:02 xiaobenhou