I can't install PyGame in PyCharm
In the Terminal
tab in PyCharm
I entered
pip3.8 install pygame
pip3 install pygame
pip install pygame
And I always got this error:
ERROR: Command errored out with exit status 1:
command: /sysroot/home/user/PycharmProject/???/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ltp9j88k/pygame/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ltp9j88k/pygame/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-un0ew218
cwd: /tmp/pip-install-ltp9j88k/pygame/
Complete output (12 lines):
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using UNIX configuration...
/bin/sh: sdl-config: команда не найдена
/bin/sh: sdl-config: команда не найдена
/bin/sh: sdl-config: команда не найдена
Hunting dependencies...
WARNING: "sdl-config" failed!
Unable to run "sdl-config". Please make sure a development version of SDL is installed.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
In a normal Linux terminal, I managed to install pygame
via pip
If this problem can't be solved, then write a Python module for handling keyboard events that you know
0
1 answers
In PyCharm Pro 2020.2.2 you can install PyGame like this:
- File
- Settings
- Project
- Python Interpreter
- [+]
- pygame
- Install Package
2
Author: Drewleks, 2020-10-16 12:57:37