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

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

Closed
rgoudie opened this issue Jan 1, 2023 · 3 comments

Comments

@rgoudie
Copy link

rgoudie commented Jan 1, 2023

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:

  • Windows 10
  • Python: 3.8.0
  • autokeras: 1.0.20
  • keras-tuner: 1.2.0.dev0
  • keras: 2.11.0
  • scikit-learn: 1.2.0
  • numpy: 1.22.4
  • pandas: 1.5.2
  • tensorflow: 2.11.0

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
Copy link
Member

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
Copy link
Author

rgoudie commented Aug 1, 2023

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

@rgoudie
Copy link
Author

rgoudie commented Aug 1, 2023

I will close the issue at this time.

@rgoudie rgoudie closed this as not planned Won't fix, can't repro, duplicate, stale Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants