我在Ubuntu 14.04上运行Python 2.7.11
我试图运行https://github.com/asrivat1/DeepLearningVideoGames并教我的电脑玩乒乓球,但我遇到pygame
错误,我似乎无法找到解决办法。
运行deep_q_network.py
时出现以下错误:
Wrapped Game Code/pong_fun.py:31: RuntimeWarning: use font: No module named font
(ImportError: No module named font)
font = pygame.font.SysFont("calibri",40)
Traceback (most recent call last):
File "deep_q_network.py", line 7, in <module>
import pong_fun # whichever is imported "as game" will be used
File "Wrapped Game Code/pong_fun.py", line 31, in <module>
font = pygame.font.SysFont("calibri",40)
File "/home/me/anaconda2/lib/python2.7/site-packages/pygame/__init__.py", line 70, in __getattr__
raise NotImplementedError(MissingPygameModule)
NotImplementedError: font module not available
(ImportError: No module named font)
我使用pygame
安装了conda install -c https://conda.anaconda.org/tlatorre pygame
。
答案 0 :(得分:0)
不是通过conda install安装,而是安装pygame:python-pygame的Ubuntu软件包,它位于Universe中。
喜欢这个
xyzUbuntu:~$ sudo apt-get install python-pygame