11

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[control+space or control+shift+space results nothing here]

I have PyCharm 2.6.2 and Python 2.7.1. What's wrong?

Add:

I'm on Mac OS 10.7.3

user1686703
  • 111
  • 1
  • 2
  • 5

5 Answers5

13

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

pickle

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
  • Thank you CrazyCoder, cache invalidation didn't help and if I can run simple python scripts and see their output doesn't this mean that I properly configured interpreter? or something can still be missing in project configuration? **add:** autocomplete works for "pickle" in import, but not as at your sceenshot – user1686703 Sep 20 '12 at 18:41
  • Project interpreter can be different from the one used in the run configuration. – CrazyCoder Sep 20 '12 at 18:44
  • I've checked it on Mac 10.8.2 with system default Python 2.7.2 and it also works fine. View | Quick Documentation should show where the completion is taken from: http://o7.no/P3t3Mg. – CrazyCoder Sep 20 '12 at 18:56
  • thanks a lot! after playing with interpreter and project settings I got it working – user1686703 Sep 20 '12 at 18:56
  • Worked for me trying to get praw completion and documentation working after installing in-IDE. Surprising that cache invalidation was necessary, though. Thank you! – Brian Jordan May 25 '13 at 23:18
7

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.

Simon
  • 71
  • 1
  • 2
1

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

César Villaseñor
  • 822
  • 1
  • 7
  • 15
0

I changed the projector interpreter and it works fine now.

janicebaratheon
  • 976
  • 1
  • 10
  • 21
0

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

Brady Huang
  • 1,852
  • 20
  • 23