5

I'm starting to use Pycharm, creating a test with Pygame.

I notice that some Pygame methods do not appear in Pycharm AutoComplete.

For example, if I want to put a pygame.mask.from_surface (), typing pygame.mas will not do anything. But if I manually complete mask and press., then the auto-complete from_surface () appears correctly.

Ex:

import pygame
car = pygame.image.load("car.png").convert_alpha()
car_mask = pygame.mas    #### .... here, Pycharm should already show autocomplete

This also appears for other situations, for example, if I want to use car.get_rect(), it does not appear there anymore after typing car.

Here are my project settings: enter image description here

How to fix this?

Rogério Dec
  • 801
  • 8
  • 31

2 Answers2

1

Not sure if this is the problem that you are facing but I found another solution that may help. Found it here : Why isn't PyCharm's autocomplete working for libraries I install?.

You've installed the 3rd-party library into a virtualenv, but PyCharm doesn't know about that by default. If nothing is specified, it will choose the system Python install as the interpreter. You need to go into the project settings and configure the interpreter to point at the virtualenv. PyCharm will then index the interpreter and allow you to autocomplete.

TMK
  • 650
  • 6
  • 15
1

Solved downloading the PyCharm Early Access Program version.

Rogério Dec
  • 801
  • 8
  • 31