PyCharm autocomplete

后端 未结 5 1829
忘掉有多难
忘掉有多难 2020-12-11 02:36

I\'m completely new to Python and PyCharm and I cannot figure out why PyCharm doesn\'t auto-completes very simple cases such as:

import pickle

pickle.dum[co         


        
相关标签:
5条回答
  • 2020-12-11 03:07

    I changed the projector interpreter and it works fine now.

    0 讨论(0)
  • 2020-12-11 03:08

    You could try with a virtualenv and on it install all you project dependencies and the go to pycharm preferences/Project Interpreter and it will update your project dependencies.

    Project Inspector

    0 讨论(0)
  • 2020-12-11 03:18

    It happened to me, too. But all the previous answers don't solve my issue.

    The weird thing is when I am coding, it will pump out the autocomplete for me. But once I leave the autocomplete mode, I cannot reproduce the autocomplete by typing Ctrl + Space.

    So the work I already surveyed are

    1. Make sure the config(e.g., virtualenv) is right in Pycharm
    2. Make sure Pycharm can show autocomplete
    3. Make sure I am not in the Power Safe Mode

    Finally I solved this just because my shortcut of switch language in the Mac is also Ctrl + Space, so it's kind of override my shortcut in the Pycharm. I change the shortcut in the Pycharm by changing in Pycharm-> Preference-> Keymap-> Main menu-> Code-> Completion ->Basic

    Then the problem is solved

    0 讨论(0)
  • 2020-12-11 03:26

    Can't reproduce. Make sure you have a valid Python interpreter configured for the project. Also try File | Invalidate Caches.

    pickle

    0 讨论(0)
  • 2020-12-11 03:26

    My experience is if you turn ON the File -> Power-Save Mode, all background tasks will be stopped, including the Auto-Complete task. So you can try turning off the Power-Save Mode.

    0 讨论(0)
提交回复
热议问题