keras-team / autokeras

AutoML library for deep learning
http://autokeras.com/
Apache License 2.0
9.1k stars 1.4k forks source link

Exception thrown: cannot import name 'keras' from 'tensorflow' (unknown location) #1824

Closed rgoudie closed 11 months ago

rgoudie commented 1 year ago

Bug Description

After installing AutoKeras and depencies according to instructions, trying to import autokeras throws the exception: cannot import name 'keras' from 'tensorflow' (unknown location)

Bug Reproduction

from autokeras import StructuredDataClassifier

Expected Behavior

Import succeeds without error.

Setup Details

Include the details about the versions of:

Additional context

The exception is thrown in many instances.

Example: This tutorial website:

import pandas as pd
import tensorflow as tf
import autokeras as ak  <--- same exception thrown

image

haifeng-jin commented 1 year ago

It might be a TensorFlow installation problem. Would you please try import keras from tensorflow in your Python commandline? It it gives the same error, then it is the TF install problem.

rgoudie commented 11 months ago

So sorry for the late reply. I never received a notification and completely forgot about the issue.

rgoudie commented 11 months ago

I will close the issue at this time.