8000 PyCharm doesn't resolve anything under tensorflow.keras · Issue #53144 · tensorflow/tensorflow · GitHub
[go: up one dir, main page]

Skip to content
PyCharm doesn't resolve anything under tensorflow.keras #53144
@markorakita

Description

@markorakita

System information

  • OS Platform and Distribution: Windows 10
  • TensorFlow installed from: binary
  • TensorFlow version: 2.7.0
  • Python version: 3.9
  • Installed using: Conda
  • CUDA/cuDNN version: 11.2/8.1

Describe the problem
I've upgraded tensorflow from 2.5 to 2.7 and now PyCharm doesn't resolve anything under tensorflow.keras.

keras-no-autocompletion

Other modules of tensorflow work, it's only keras that's problematic. I believe this has something to do with the change in TF 2.6 where keras has been split into a separate PIP package.

People have also been reporting this problem to JetBrains (PyCharm developers): https://youtrack.jetbrains.com/issue/PY-50318

Provide the exact sequence of commands / steps that you executed before running into the problem

  1. Create the conda environment:
    ~ conda create --name tensorflow27
  2. Activate it:
    ~ conda activate tensorflow27
  3. Install Python:
    ~ conda install python=3.9
  4. Install TensorFlow:
    ~ pip install tensorflow
  5. Create new project in PyCharm
  6. Write this code:
import tensorflow as tf
tf.keras.preprocessing.image_dataset_from_directory()
  1. When you move mouse to image_dataset_from_directory function there will be no autocomplete.
  2. Writing tf.keras. yields no modules/functions

Any other info / logs
/

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0