简体   繁体   中英

Pygame for Python3.5 on CentOS 7

Thanks in advance for the help.

I am trying to install Pygame for Python 3.5.

I have spent many hours doing research and found that it was possible for Windows, yet nothing about CentOS.

Is it possible to install Pygame for Python 3.5 on CentOS 7?

If so, how can i do it?

I have tried many commands, all of which have not worked. Thanks for the help

You can compile pygame from source code.

1) Get dependances:

yum install python3 python3-tools python3-devel SDL SDL-devel portmidi portmidi-devel ffmpeg ffmpeg-devel SDL_image-devel SDL_mixer-devel SDL_ttf-devel libjpeg-turbo-devel  
cd /usr/lib  
ln -s libportmidi.so libporttime.so  

2) Get pygame source code:

svn co svn://seul.org/svn/pygame/trunk pygame
cd pygame

3) Then config, compile and install:

python3 config.py
python3 setup.py build
python3 setup.py install

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM