我正在尝试遵循有关使用 python 和“acade”包开发游戏的指南。我已经使用以下方式安装了街机:(我正在使用 linux)
pip3 install arcade
然后我尝试编译以下代码来测试新安装的包:
import arcade
SCREEN_WIDTH = 600
SCREEN_HEIGHT = 600
arcade.open_window(SCREEN_WIDTH, SCREEN_HEIGHT, "Drawing Example")
arcade.set_background_color(arcade.color.WHITE)
arcade.start_render()
x = 300
y = 300
radius = 200
arcade.draw_circle_filled(x, y, radius, arcade.color.YELLOW)
x = 370
y = 350
radius = 20
arcade.draw_circle_filled(x, y, radius, arcade.color.BLACK)
x = 230
y = 350
radius = 20
arcade.draw_circle_filled(x, y, radius, arcade.color.BLACK)
x = 300
y = 280
width = 120
height = 100
start_angle = 190
end_angle = 350
arcade.draw_arc_outline(x, y, width, height, arcade.color.BLACK, start_angle, end_angle, 10)
arcade.finish_render()
arcade.run()
我收到以下错误:
File "/home/beewulf/.local/lib/python3.6/site-packages/pyglet/window/xlib/__init__.py", line 805, in _set_text_property
raise XlibException('Could not create UTF8 text property')
pyglet.window.xlib.XlibException: Could not create UTF8 text property
我已尝试遵循 [ https://github.com/openai/gym/issues/673]中的解决方案, 但它没有用。
有人有什么想法吗?