Ubuntu 18.04 Além da pip install solução óbvia no 18.04, a outra alternativa é baixar manualmente o arquivo python3-pygame . deb para o 19.04 e instalá-lo sudo apt ./python3-pygame_1. 9.4.
Depois de instalar o Python, instale o PyGame por meio da linha de comando (ou do terminal no VS Code) digitando python -m pip install -U pygame --user . Se tudo estiver certo, o jogo abrirá uma janela. Feche a janela quando terminar de jogar.
Primeiro, é preciso importar o módulo Pygame com o comando import pygame. Depois, é preciso importar os locals do pygame que contém eventos de controle, mouse e teclados com o comando from pygame. import locals *.
Para o PyCharm 2017, faça o seguinte:
To install PyGame for Python 3.x on Ubuntu 19.04 and later open the terminal and type: To install python3-pygame in Ubuntu 18.10 open the terminal and type: Add this line to sources.list. Update the list of available software and install python3-pygame.
If it works in the console when you type 'python yourscript.py' but not in vs code, you should press ctrl+shift+p and use clic on Python select interpreter to switch to the right env. if it sstill doesn't work then install the package by running 'python -m pip install pygame' Thanks for contributing an answer to Stack Overflow!
Whenever I start python and type import pygame it tells me that there is no module named pygame. How can I install pygame? The reason you are not able to import pygame into your python interpreter is because you are installing it for python2 and starting the python3 interpreter (Ubuntu 13.10 uses python3 by default).
If you are using the Thonny IDE go under: Search for Pygame in the search bar then double click the pthird-party plugin. Thanks for contributing an answer to Ask Ubuntu!
O que significa falar com clareza?
Qual a maior cidade do Nordeste em extensão territorial?
O que eu devo fazer para tirar o meu nome de um registro de uma criança?
Qual crime comete quem invade terreno alheio?
Como se escreve em inglês 8 30?
Como ativar caixa alta no celular?
Como fazer a escolha do Livro didático no PDDE interativo?
Tem muito brasileiro no Japão?
Qual foi o primeiro aplicativo de mensagens?
O que é extinção do processo por perda do objeto?
Qual é o melhor adubo para plantar cebola?
Qual o tipo de semicondutor utilizado na fabricação de diodos de potência?
Quais são as quatro bases do RNA?
Como foi a colonização dos Estados Unidos?
Qual é o anime mais assistido 2021?
Quanto tempo ficar deitada depois de transar para engravidar?
Porque é importante saber se existe a proteína HER2 em uma biópsia de câncer de mama?
Qual a principal causa das infecções relacionadas à assistência à saúde?