You can simply follow these steps:

  1. In the Settings/Preferences dialog (Ctrl+Alt+S), click Editor | General | Auto Import.
  2. In the Python section, configure automatic imports:
    • Select Show import popup to automatically display an import popup when tying the name of a class that lacks an import statement.
    • Select one of the Preferred import style options to define the way an import statement to be generated.

Let me know how it goes!

Answer from Aly Mobarak on Stack Overflow
🌐
JetBrains
jetbrains.com › help › pycharm › creating-and-optimizing-imports.html
Auto import | PyCharm Documentation
1 month ago - Using Import Assistant is the preferred way to handle imports in PyCharm because import optimizations are not supported via command line. The same possibility applies to XML files. When you type a tag with an unbound namespace, the import assistant suggests creating a namespace and offers a list of appropriate choices. You can configure the IDE to automatically add import statements if there are no options to choose from.
Discussions

python - Can I use another shortcut for auto import in pycharm? - Stack Overflow
The shortcut Alt+Enter is intercepted by my window manager(i3) to create a new terminal, so the default shortcut of auto import(which is also Alt + Enter) doesn't work in pycharm. Can I use another More on stackoverflow.com
🌐 stackoverflow.com
python - Pycharm auto relative imports - Stack Overflow
Whenever you use autoimport provided by PyCharm it generates an absolute path import. i.e. from my_package.my_subpackage import my_thing instead of from .my_subpackage import my_thing Is there a More on stackoverflow.com
🌐 stackoverflow.com
Why my auto import doesn't work like in pycharm?
Just in case -> settings.json { "workbench.colorTheme": "Monokai", "workbench.iconTheme": "material-icon-theme", "window.zoomLevel": 1, "python.analysis.completeFunctionParens": true, "python.analysis.indexing": true, "python.analysis.autoImportCompletions": true, "python.analysis.diagnosticMode": "workspace", } More on reddit.com
🌐 r/vscode
6
3
August 22, 2022
How to stop Pycharm adding imports to my code automatically ?
Have you checked the settings? It should not add imports automatically. Or do you use any PyCharm plugins that do that extra stuff? Just disable features you don't like or need. More on reddit.com
🌐 r/pycharm
7
14
December 3, 2024
🌐
Reddit
reddit.com › r/jetbrains › intelij auto import functionality in pycharm
r/Jetbrains on Reddit: InteliJ Auto Import Functionality In PyCharm
December 18, 2020 -

Hey All,

I recently started using InteliJ and I noticed as you start typing a class name it shows suggestions and you can tap enter to complete/import. Where as in PyCharm I typically have to type the class name and hit Alt Enter to import.

I feel like I'm missing an obvious setting but I can't seem to find it. Can anyone point me in the right direction?

https://imgur.com/a/wkjW8TD

🌐
JetBrains
youtrack.jetbrains.com › issue › PY-44845 › auto-import-stopped-working
auto import stopped working : PY-44845
{{ (>_<) }} This version of your browser is not supported. Try upgrading to the latest stable version. Something went seriously wrong
🌐
JetBrains
youtrack.jetbrains.com › issue › PY-31207 › Pycharm-Auto-Import-does-not-work-in-console
Pycharm: Auto-Import does not work in console : PY-31207
{{ (>_<) }} This version of your browser is not supported. Try upgrading to the latest stable version. Something went seriously wrong
🌐
Medium
medium.com › the-lazy-developer › lazy-developer-tip-3-auto-import-python-modules-a66a314b22b
Automatically import Python modules in PyCharm as you code | by Devin Finzer | The Lazy Developer | Medium
May 12, 2016 - PyCharm auto-imports in action. Auto-imports allow you to autocomplete whatever code you’re typing with a list of modules, classes, or functions which are immediately auto-imported when selected. ... 3. Next, look up the keyboard shortcut for auto-completion and change it to whatever shortcut you’d like to use. ... Now when you tap this shortcut twice you will get the special auto-import dropdown (I’d love to know a way to get this to work ...
Find elsewhere
🌐
JetBrains
youtrack.jetbrains.com › issue › PY-44845
Jetbrains
November 19, 2021 - {{ (>_<) }} This version of your browser is not supported. Try upgrading to the latest stable version. Something went seriously wrong
🌐
JetBrains
youtrack.jetbrains.com › issue › PY-14206 › Auto-import-does-not-include-Source-root
Auto-import does not include Source root : PY-14206
{{ (>_<) }} This version of your browser is not supported. Try upgrading to the latest stable version. Something went seriously wrong
🌐
Reddit
reddit.com › r/vscode › why my auto import doesn't work like in pycharm?
r/vscode on Reddit: Why my auto import doesn't work like in pycharm?
August 22, 2022 - I have a high threshold for tolerating bugs with Jetbrains/Pycharm, but.... damn it's getting old. ... Anything and everything relating to JetBrains their products and projects. Find out more about JetBrains at https://jetbrains.com/ ... Hi, in the past 3 months, I found decreasing quality of IDE hints. WebStorm is showing incorrect hints despite type awareness from the typescript server. Issue persists in a fresh install. VS Code works correctly.
🌐
Stack Overflow
stackoverflow.com › questions › 58769844 › pycharm-auto-import-is-not-working-with-variables-inside-f-strings
python 3.x - Pycharm auto-import is not working with variables inside f-strings - Stack Overflow
November 8, 2019 - It seems like the auto import functionality of Pycharm doesn't work on f-strings. Does anybody has experienced the same behaviour ? Does a solution exist to fix this ? What I mean is this: Let's say we have a constant in a moduleA, and that in moduleB, we do something like: ... I would expect Pycharm to prompt for auto-importing A_CONSTANT_IN_MODULEA, but it doesn't. I am using Pycharm Community edition version 2019.2 on OpenSUSE ... I'm not sure what's different about my PyCharm, but I've never once been prompted to auto-import a module.
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360004264019-Pycharm-doesn-t-detect-suggest-modules-classes-or-functions-to-import-when-typing
Pycharm doesn't detect / suggest modules, classes, or functions to import when typing – IDEs Support (IntelliJ Platform) | JetBrains
June 29, 2019 - Expected behavior: a context menu will automatically open with "Import from..." in the title, offering to import "os.path.join()" Actual behavior: Nothing happens. Once "join" is fully typed out, alt+enter will display an option to import the function ... I don't think PyCharm ever offered imports from incomplete entries like "joi".
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360003378240-python-console-and-auto-import-not-working-for-my-project-s-code
python console and auto import not working for my project's code – IDEs Support (IntelliJ Platform) | JetBrains
March 24, 2019 - I can get the discovery of the class I want to use, but the `from myModule import MyClass` is not automatically added. If I try to do that for an external package, it works fine. For example if I want to import something included in the django package it's ok, but anything in my project is found in the suggestion, but the import line is not added.
🌐
JetBrains
jetbrains.com › help › pycharm › auto-completing-code.html
Code completion | PyCharm Documentation
February 2, 2026 - Auto-import on code completion is also applied to some popular package name aliases, such as np for numpy or pd for pandas. PyCharm allows you to prioritize completion suggestions based on choices that other users made in similar situations. The ML completion mechanism does not add any new ...
🌐
Quora
quora.com › Why-is-import-not-working-in-PyCharm
Why is import not working in PyCharm? - Quora
... It means you are importing some stuffs, but not using them. You should first take it as a warning and check your code to see why are you importing it at all. Likely, your code will work as you desire without that specific import statement.
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360009733119-PyCharm-doesn-t-display-suggestions-for-non-imported-symbols-while-typing
PyCharm doesn't display suggestions for non-imported symbols while typing – IDEs Support (IntelliJ Platform) | JetBrains
September 29, 2020 - The weird thing though is that if you ask for PyCharm to autocomplete & auto-import using Ctrl+Space+Space it will complete the typed thing with its best match even if it's not imported, in which case it will even auto-generate an import statement.