Shell restarts every time I import keras

Viewed 111

I just installed keras with pip and want to use it but I have some issues with it. It appears that the shell restarts every time I try to import it:

import random
print("1")
from keras import preprocessing
print("2")

Here's the output I get in IDLE:

1

============================================================================ RESTART: Shell ===========================================================================
>>> 

I also tried to run the code from the terminal, here's the output:

*$ python3 main.py  
1  
Illegal instruction (core dumped)*

This seems to happend every time I import keras. Does anyone know a solution to this?

Python: 3.8.2

1 Answers

Few APIs of Keras are in still beta version for Python 3.8.
So, make a virtual environment and downgrade to Python 3.7.
And try again.

Related