本文介绍了如何在Ubuntu16.04中为python3.5安装pygame?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我花了几个小时来安装 pygame,但我没有成功.

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

我想要一个pygame在Ubuntu16.04中python3.5的详细安装说明.

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.

推荐答案

你可能没有安装 pip3.5,所以我相信你并不容易.因此,一种解决方案可能是开始安装 pip3.5.基于这篇文章关于如何在 Ubuntu 中安装 pip3,这是您问题的可能解决方案.

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.

首先为 Python 3 安装 setuptools

First install setuptools for Python 3

sudo apt-get install python3-setuptools

然后安装pip(将包括pip3.5):

sudo easy_install3 pip

在前两个命令之后,您应该已经安装了pip3.5.现在你可以简单地做

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

sudo pip3.5 install pygame

我在 Ubuntu 16.04 上试过,效果很好.

I tried it on Ubuntu 16.04 and it worked.

这篇关于如何在Ubuntu16.04中为python3.5安装pygame?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-01 17:25