Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
453 views
in Technique[技术] by (71.8m points)

python 3.5 - How to install pygame for python3.5 in Ubuntu16.04?

I've spent hours for installing pygame, but it I didn't succeed.

I want a detailed installing instruction for pygame in python3.5 in Ubuntu16.04.

And I think it's a meaningful work for other people.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You probably do not have pip3.5 installed, so I believe you it's not been easy. So one solution may be to start installing pip3.5. Based on this article on how to install pip3 in Ubuntu, here's a possible solution for your problem.

First install setuptools for Python 3

sudo apt-get install python3-setuptools

Then install pip (which will include pip3.5):

sudo easy_install3 pip

After the previous two commands, you should have pip3.5 installed. Now you can simply do

sudo pip3.5 install pygame

I tried it on Ubuntu 16.04 and it worked.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...