Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name Error : h5py #9

Open
Sali4faizi opened this issue Aug 23, 2019 · 4 comments
Open

Name Error : h5py #9

Sali4faizi opened this issue Aug 23, 2019 · 4 comments

Comments

@Sali4faizi
Copy link

Please help me solve the issue

runfile('C:/Users/iiitmk/Emotion_recognition/demo.py', wdir='C:/Users/iiitmk/Emotion_recognition')
Reloaded modules: emotion_predictor
Traceback (most recent call last):

File "", line 1, in
runfile('C:/Users/iiitmk/Emotion_recognition/demo.py', wdir='C:/Users/iiitmk/Emotion_recognition')

File "C:\Users\iiitmk\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 786, in runfile
execfile(filename, namespace)

File "C:\Users\iiitmk\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "C:/Users/iiitmk/Emotion_recognition/demo.py", line 12, in
model = EmotionPredictor(classification='ekman', setting='ml', use_unison_model=True)

File "C:\Users\iiitmk\Emotion_recognition\emotion_predictor.py", line 31, in init
self.model = self._get_model()

File "C:\Users\iiitmk\Emotion_recognition\emotion_predictor.py", line 43, in _get_model
return load_model(self._loaded_model_filename)

File "C:\Users\iiitmk\Anaconda3\lib\site-packages\keras\engine\saving.py", line 417, in load_model

File "C:\Users\iiitmk\Anaconda3\lib\site-packages\keras\utils\io_utils.py", line 182, in init

NameError: name 'h5py' is not defined

@nikicc
Copy link
Owner

nikicc commented Aug 23, 2019

@Sali4faizi it seems that the h5py dependency is missing. Try to install it with pip install h5py, if that doesn't work, please check this section of Keras documentation.

@nikicc
Copy link
Owner

nikicc commented Aug 23, 2019

Oh wait ... you are on Conda. Then use this instead of pip: conda install h5py.

@Sali4faizi
Copy link
Author

@nikicc Thanks for your quick reply...h5py is already installed...but still showing this name error

@nikicc
Copy link
Owner

nikicc commented Aug 26, 2019

@Sali4faizi so if you try to import it in a python shell it works? Try do double check if importing it works as expected by opening a Python interpreter and type this:

>>> import h5py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants